nested functions in Objective-C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am thinking about using nested functions in Objective-C, and I have read
that one is not supposed to call them after the enclosing function has
exited. Now, this makes perfect sense if the nested function references
local variables from the enclosing function, since their lifetime has
expired. I was wondering though if this restriction applies also to the
receiver (and its variables). The receiver is very likely to be still alive
long after any one of its particular methods has exited.
Can somebody please tell me if the receiver is indeed accessed differently
(in a nested function) than through the activation record for the enclosing
function call, meaning that one could call a nested function even after the
enclosing function has exited if the nested function only references the
receiver?

Thank you,

Florin



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux