Apple Enterprise - NeXTanswers Support Archive
Enterprise
[Index]
[Download]


Search NeXTanswers for:

NEXTSTEP


Title: EOApplication leaks after exception in modal panel

Entry Number:
2080
Last Updated: 29 November 1995
Document Revision: <<Date June 17, 1997>>

Keywords:
EOApplication, leak, modal panel, exception

Question


After cancelling or raising and exception in a modal panel, my program begins leaking all autoreleased objects. Consequently, the virtual memory size of my application keeps growing. How can I fix this?

Answer


The EOApplication class supplied with EOF is responsible for managing the top level autorelease pool for the application. There is a bug in the implementation shipped with EOF 1.0 and EOF 1.1 that causes it to permanently cease freeing autoreleased objects once an exception has been raised from inside a modal panel. Calling NXAbortModal() also causes this problem.

You can work around this problem by linking the 4-way fat patch provided with NeXTanswer #2082
(also available via ftp from ftp.next.com under the path in URL format: ftp://ftp.next.com/pub/NeXTanswers/Files/Software_and_Tools/Unsupported_Software/EOApplicationPatch/2082_EOApplicationPatch.o )

See Also:

Valid for: EOF 1.0, EOF 1.1, NEXTSTEP 3.2 Developer, NEXTSTEP 3.3 Developer


OpenStep | Alliances | Training | Tech Support | Where to Buy