views:

56

answers:

3

I am looking at an example online that contains this code in objective-c

    -(void)dealloc {
    [activeController viewWillDisappear:NO];
    [activeController.view removeFromSuperview];
    [activeController viewDidDisappear:NO];

    [activeController release];
    [super dealloc];
}

I assume the MT equivalent would be Dispose, am I correct?

I won't need to call the:

    [activeController release];
    [super dealloc];

methods as they will be Garbage collected on Monotouch, is this also correct?

+2  A: 

Monotouch is garbage collected. Before an object is garbage collected, the destructor for the object is called.

Here's Microsoft's page about C# destructors. I don't know if there's more relevant documentation for destructors in Monotouch.

GregInYEG
A: 

You don't need to call release or dealloc, they're taken care of by MonoTouch.

bryan costanich