aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llwindow/llwindowmacosx-objc.mm
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:50 -0500
committerJacek Antonelli2008-08-15 23:45:50 -0500
commit2a4dea528f670b9bb1f77ef27a8a1dd16603d114 (patch)
tree95c68e362703c9099d571ecbdc6142b1cda1e005 /linden/indra/llwindow/llwindowmacosx-objc.mm
parentSecond Life viewer sources 1.20.6 (diff)
downloadmeta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.zip
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.gz
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.bz2
meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.xz
Second Life viewer sources 1.20.7
Diffstat (limited to '')
-rw-r--r--linden/indra/llwindow/llwindowmacosx-objc.mm8
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 {