Skip navigation.
 
mlRe: Do Cocoa bindings retain their own values?
FROM : Shawn Erickson
DATE : Mon Nov 19 22:58:42 2007

On Nov 19, 2007 1:42 PM, Frank Reiff <<email_removed>> wrote:

> Now for the question: can I call it with waitUntilDone: NO !?


Yes, assuming no other inter-thread dependencies exist.

> The code as it stands wouldn't be thread safe because the NSString
> parameter might already have been de-allocated by the worker thread by
> the time [text copy] is executed on the main thread.


The performSelectorOnMainThread:withObject: method retains the object
you supply until the target object has processed the selector.

-Shawn

Related mailsAuthorDate
mlDo Cocoa bindings retain their own values? Frank Reiff Nov 19, 22:42
mlRe: Do Cocoa bindings retain their own values? Mike Abdullah Nov 19, 22:52
mlRe: Do Cocoa bindings retain their own values? Shawn Erickson Nov 19, 22:58