Re: Callbacks and autorelease pools
Re: Callbacks and autorelease pools
- Subject: Re: Callbacks and autorelease pools
- From: Dave Camp <email@hidden>
- Date: Mon, 22 Sep 2003 13:09:19 -0700
Wrap the code in the callback with:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
...
...
[pool release];
Dave
On Monday, September 22, 2003, at 12:18 PM, Stefan Pantos wrote:
Hi,
I want to get hold of all the Neighborhoods and computers on the
network. I know that I can use NSL in the Carbon library to do this. I
want to make the GUI using Cocoa. Is there another library in Cocoa
which will do the same as NSL?
If there isn't then. The NSL library works using callback. I want to
add something to an NSArray in the callback. This means I need to use
a Obj-C wrapper. The wrapper needs allocating but it doesn't like the
NSArray because it has no autorelease pool being a call from NSL. How
do I fix/get round this?
At least this is what I think the error "2003-09-22 19:43:11.933
MyProgram[12932] *** _NSAutoreleaseNoPool(): Object 0x321260 of class
NeighborhoodWrap autoreleased with no pool in place - just leaking"
means.
Thanks,
Stefan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
---
It is dark; you are likely to be eaten by a grue. -Zork
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.