summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llwindowmacosx-objc.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm
index b68ea8ef8f..59b25e1726 100644
--- a/indra/llwindow/llwindowmacosx-objc.mm
+++ b/indra/llwindow/llwindowmacosx-objc.mm
@@ -47,6 +47,8 @@ void setupCocoa()
if(!inited)
{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
// This is a bit of voodoo taken from the Apple sample code "CarbonCocoa_PictureCursor":
// http://developer.apple.com/samplecode/CarbonCocoa_PictureCursor/index.html
@@ -55,6 +57,8 @@ void setupCocoa()
// 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
[[[NSWindow alloc] init] release];
+
+ [pool release];
}
}
@@ -82,8 +86,10 @@ OSErr releaseImageCursor(CursorRef ref)
{
if( ref != NULL )
{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSCursor *cursor = (NSCursor*)ref;
[cursor release];
+ [pool release];
}
else
{
@@ -97,8 +103,10 @@ OSErr setImageCursor(CursorRef ref)
{
if( ref != NULL )
{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSCursor *cursor = (NSCursor*)ref;
[cursor set];
+ [pool release];
}
else
{