[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Rép : Double free invisible due to autorelease pool
From: |
Sébastien Pierre |
Subject: |
Rép : Double free invisible due to autorelease pool |
Date: |
Thu, 3 Feb 2005 11:35:05 +0100 |
Le 3 févr. 05, à 11:10, Richard Frith-Macdonald a écrit :
In which case, you can use NSSetUncaughtExceptionHandler(), which is
documented in the macros part of the 'Functions' section of the base
library documentation.
This seems to be the most appropriate solution :)
Actually, I managed to track the source of the double free using the
`malloc_history' command to get the type of object that was released
twice. I found valuable information here, too
<http://www.cocoadev.com/index.pl?DebuggingAutorelease>.
The environment variable is documented at the top level (introductory)
page of the base library documentation in the section on environment
variables.
The global variable (set from the environment variable) is documented
in the 'Types and Constants' documentation of the base library.
Thanks, I assumed it was documented in the base reference
<http://www.gnustep.org/resources/documentation/Developer/Base/
Reference/index.html> - but I found the pages you mention by googlin'
;)
Basically, it allows deallocated objects to persist and call a
standard function when you try to use them ... so you can track them
down more easily under debug.
It's strange, because in the case of my autoreleasing of an already
released object, this did not work, neither on OSX or GNUstep. I will
try to write examples and see if I can reproduce this.
Thanks a lot for your help (and saving me hours of bug chasing ;)
-- Sébastien
--
«La plupart des journaux ou des émissions d'actualité sont
conçus pour donner au spectateur l'impression d'être un mouton
bien protégé qui ne peut que souffrir s'il s'écarte du troupeau»
<http://www.type-z.org> -- Poppy Z.Brite, La poésie de la violence
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Rép : Double free invisible due to autorelease pool,
Sébastien Pierre <=