ResizableWindow::setResizable giving error


When running in debug mode anything with :

gets the following error:

2008-09-30 16:48:59.280 juce_application[31308:813] *** _NSAutoreleaseNoPool(): Object 0x82d800 of class NSImage autoreleased with no pool in place - just leaking Stack: (0x90234adf 0x901411f2 0x1234d1 0x1236fe 0x12388a 0x123b78 0x201b83 0x201c66 0x12f011 0x18fe2c 0x19013b 0x370b 0x396b 0x1d27df 0x1d2c51 0x353b 0x2e63 0x2d91)

I dug deep and traced it to

if i coment out

or change it to a normal cursor
i get no error
i tried digging deeper but i got confused…

i checked for the cursor file in my directory and its there…
any ideas?


That’ll all be sorted out as part of the new cocoa code I’m writing. If you’re in a hurry, you’d just need to add a cocoa NSAutoreleasePool object inside the native mac cursor creation stuff.


ah like honey to my ears! (or cocoa?)

no hurry, its just something i thought you’d like to know i can live without it :wink:


I’m using JUCE in my cocoa app(with pretty good success, a few little hacks!) with its own release pool, but when I made a little standalone JUCE application I needed to inject a release pool into JUCE.(mainly for my own OBJ-C objects)

I did this in…juce_dispatchNextMessageOnSystemQueue (code below) and its working for me

FWIW, I scoured most of the Mac specific JUCE code and the only place where an autoreleased object is created without a pool in place is the cursor.

(I too am looking forward to the cocoa version of JUCE!) I know it must have been a truckload of work for Julian, and i’m very curious to see how its been implemented(does the window hold an NSView that handles all the events?)


bool juce_dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages)
    NSAutoreleasePool *eventPool=[[NSAutoreleasePool alloc]init];
    bool result=false;
    if (juce_currentMouseTrackingPeer != 0)

/*    [[NSRunLoop mainRunLoop] acceptInputForMode: NSDefaultRunLoopMode
                                beforeDate: returnIfNoPendingMessages
                                                ? [[NSDate date] addTimeInterval: 0.01]
                                                : [NSDate distantFuture]];
    EventRef theEvent;

    if (ReceiveNextEvent (0, 0, (returnIfNoPendingMessages) ? kEventDurationNoWait
                                                            : kEventDurationForever,
                          true, &theEvent) == noErr)
        if (GetEventClass (theEvent) == kEventClassAppleEvent)
            EventRecord eventRec;
            if (ConvertEventRefToEventRecord (theEvent, &eventRec))
                AEProcessAppleEvent (&eventRec);

            EventTargetRef theTarget = GetEventDispatcherTarget();
            SendEventToEventTarget (theEvent, theTarget);
        ReleaseEvent (theEvent);
	[eventPool release];
    return result;


The cocoa code’s almost done - it’s all working for apps, but I’m just having problems trying to build plugins with it. Will post stuff about this very soon!