public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* nested functions in Objective-C
@ 2004-01-04 22:08 Florin
  0 siblings, 0 replies; only message in thread
From: Florin @ 2004-01-04 22:08 UTC (permalink / raw)
  To: gcc-help

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-01-04 22:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-04 22:08 nested functions in Objective-C Florin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).