- (void) tearDown
{
// tear-down code here
[super tearDown];
}
What is the functionality of tearDown here?
Does "tearDown
" only used to release the memory?
or something else?
- (void) tearDown
{
// tear-down code here
[super tearDown];
}
What is the functionality of tearDown here?
Does "tearDown
" only used to release the memory?
or something else?
In general, tearDown should undo anything done in setUp.
As for releasing memory, tearDown could do that but that really should done as soon as possible (so in tearDown, it would release any memory initialized in setUp). If you initialize it in your test, it should be released in your test.