discuss-gnustep
[Top][All Lists]
Advanced

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

What does NSAutoreleasePool actually do?


From: 黃俊傑(Chun-Chieh Huang)
Subject: What does NSAutoreleasePool actually do?
Date: 18 Apr 2003 21:51:23 +0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Dear all,
    I have some questions about NSAutoreleasePool in GNUstep.

    I have written some code in OPENSTEP 4.2. I recalled that 
NSAutoreleasePool is cleaned up when the command loop refreshes. 
And I read dread.m and dwrite.m in GNUstep base source tarball.
The two files, dread.m and dwrite.m, are all command line tools, which
doesn't need GUI portion. So I think there should be no command loops
in such a command line tool. But how come there is a NSAutoreleasePool
instance? 

    If it does exist a command loop, what is the loop exactly? And how
is it operated? If it doesn't exist a command loop, when are objects
in the pool to be cleaned up? 



P.S.
    Thanks for those who helped me about making command line tools.
I use tool.make in my GNUmakefile.
In my main.m, I created an NSAutoreleasePool, and create my simulator
instance, set it up, and then make it peform some actions. Finally, I
release my simulator instance and the pool. I need to modify some
memory management, but it works. Thanks.
-- 
Chun-Chieh Huang(黃俊傑)       | E-mail: jjhuang AT cm.nctu.edu.tw
Department of Computer Science | 
National Tsing Hua University  | MIME/ASCII/PDF/PostScript are welcome!
HsinChu, Taiwan                | NO MS WORD DOC FILE, PLEASE!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]