diff options
Diffstat (limited to 'linden/indra/llwindow/llwindowmacosx-objc.mm')
-rw-r--r-- | linden/indra/llwindow/llwindowmacosx-objc.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linden/indra/llwindow/llwindowmacosx-objc.mm b/linden/indra/llwindow/llwindowmacosx-objc.mm index d2efd77..d4ea2be 100644 --- a/linden/indra/llwindow/llwindowmacosx-objc.mm +++ b/linden/indra/llwindow/llwindowmacosx-objc.mm | |||
@@ -47,6 +47,8 @@ void setupCocoa() | |||
47 | 47 | ||
48 | if(!inited) | 48 | if(!inited) |
49 | { | 49 | { |
50 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | ||
51 | |||
50 | // This is a bit of voodoo taken from the Apple sample code "CarbonCocoa_PictureCursor": | 52 | // This is a bit of voodoo taken from the Apple sample code "CarbonCocoa_PictureCursor": |
51 | // http://developer.apple.com/samplecode/CarbonCocoa_PictureCursor/index.html | 53 | // http://developer.apple.com/samplecode/CarbonCocoa_PictureCursor/index.html |
52 | 54 | ||
@@ -55,6 +57,8 @@ void setupCocoa() | |||
55 | 57 | ||
56 | // Must first call [[[NSWindow alloc] init] release] to get the NSWindow machinery set up so that NSCursor can use a window to cache the cursor image | 58 | // Must first call [[[NSWindow alloc] init] release] to get the NSWindow machinery set up so that NSCursor can use a window to cache the cursor image |
57 | [[[NSWindow alloc] init] release]; | 59 | [[[NSWindow alloc] init] release]; |
60 | |||
61 | [pool release]; | ||
58 | } | 62 | } |
59 | } | 63 | } |
60 | 64 | ||
@@ -82,8 +86,10 @@ OSErr releaseImageCursor(CursorRef ref) | |||
82 | { | 86 | { |
83 | if( ref != NULL ) | 87 | if( ref != NULL ) |
84 | { | 88 | { |
89 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | ||
85 | NSCursor *cursor = (NSCursor*)ref; | 90 | NSCursor *cursor = (NSCursor*)ref; |
86 | [cursor release]; | 91 | [cursor release]; |
92 | [pool release]; | ||
87 | } | 93 | } |
88 | else | 94 | else |
89 | { | 95 | { |
@@ -97,8 +103,10 @@ OSErr setImageCursor(CursorRef ref) | |||
97 | { | 103 | { |
98 | if( ref != NULL ) | 104 | if( ref != NULL ) |
99 | { | 105 | { |
106 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | ||
100 | NSCursor *cursor = (NSCursor*)ref; | 107 | NSCursor *cursor = (NSCursor*)ref; |
101 | [cursor set]; | 108 | [cursor set]; |
109 | [pool release]; | ||
102 | } | 110 | } |
103 | else | 111 | else |
104 | { | 112 | { |