[Q] Releasing objects owned by Gorm interface element

Samuel Hornus <[email protected]>
Newsgroups gmane.comp.lib.gnustep.user
Organization ARTIS/GRAVIR
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.