[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Q] Releasing objects owned by Gorm interface element
From: |
Samuel Hornus |
Subject: |
[Q] Releasing objects owned by Gorm interface element |
Date: |
Thu, 9 Dec 2004 00:23:17 +0100 |
Hi,
I have a MeshView subclass of NSOpenGLView, which is instanciated
via a Gorm interface.
The MeshView owns a Mesh like this:
- (void)setMesh:(Mesh *)aMesh;
{
[mMesh autorelease];
[aMesh retain];
mMesh = aMesh;
}
and releases the Mesh at the end like this:
- (void)dealloc
{
[mMesh release];
}
When the app is running, I have checked that the retainCount of
mMesh is correctly equal to one.
When I quit the application, however the Mesh does not seem to be released: as
I wrote:
// Mesh implementation...
- (void)dealloc
{
NSLog(@"Deallocating mesh...\n");
fprintf(stderr,"Deallocating mesh stderr...\n");
if( NULL != mVertices )
free(mVertices);
if( NULL != mIndices )
free(mIndices);
[super dealloc];
}
And nothing gets written on my terminal...
Is dealloc: ever called ?
How can I make sure the Mesh is deallocated ?
TIA !
--
Samuel Hornus
- [Q] Releasing objects owned by Gorm interface element,
Samuel Hornus <=