• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
unloading bundled class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unloading bundled class


  • Subject: unloading bundled class
  • From: Andreas Wolf <email@hidden>
  • Date: Thu, 17 May 2001 16:24:02 -0700

Hi,

Thanks for all the helpful answers to my previous questions.
Here is another one:

Is there a save way to get rid of a bundle's allocated memory? (Just as if you'd quit the bundle).

I have a:

bundle=[NSBundle bundleWithPath::[[NSBundle mainBundle] pathForResource: componentName ofType::@"bundle"]];

if(componentClass=[bundle principalClass])
{
componentInstance = [[componentClass alloc] init];
[componentInstance show:nil];
// .. do things with componentInstance
}


Now, it figures that I could get rid of the bundled componentInstance by releasing it.

[componentInstance release];
componentInstance = nil;

However, top shows that I don't really get rid of all allocated memory, since the size of my program increases everytime I load the bundle and never actually decreases (although I know that the componentInstance gets the release message and its -(void) dealloc function is called.

My thinking was that componentClass and bundle get autoreleased..
I am pretty sure that the extra memory within my program is from the bundle.
Is there a way to make sure that a bundle "unloads" completely?

Thanx for any help in advance.
-Andreas


  • Prev by Date: Re: Newbie Question about the View
  • Next by Date: Re: Find not working?
  • Previous by thread: Re: problems with NSBeginAlertSheet
  • Next by thread: Re: unloading bundled class
  • Index(es):
    • Date
    • Thread