Hi,
Ivan Vučica wrote:
Why not override -[FilOpExecutor retain] temporarily?
While it'll be very verbose and is very non-recommended in production
code, it'll allow you to set a breakpoint and figure out what's trying
to retain the object. Sure, it'll be a lot of effort to track it
down... but hey, that's why debugging is hard.
I indeed remain at release count 1, so clearly miss a release somewhere
(or have one retain too much).
however, if I remove any of the retains I think I could do without, I
get a crash. So the problem is the release.
However, i don't know where to release! When may I release the object
executing the thread? I thought tat releasing it in the
NSThreadWillExitNotificaion would be nice, but what happens is that
there the object is already invalid.
"An |NSThread| object posts this notification when it receives the |exit
<https://developer.apple.com/library/IOs/documentation/Cocoa/Reference/Foundation/Classes/NSThread_Class/index.html#//apple_ref/occ/clm/NSThread/exit>|
message, before the thread exits. Observer methods invoked to receive
this notification execute in the exiting thread, before it exits."
so, well, it exited! This confuses me: it exits and does not release,
but i can't release it afterwards. A call to detachNewThreadSelector may
involve oneway methods, thus asynchornous stuff, it is not that I can
just put a release at the end (which end?)
Riccardo
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep