0

I'm sorry, I think this question is much too specific. But anyway, here it goes:

I'm making a wrapper for an application, and because my wrapper consumes lots of memory due to the kinds of things it does, it quits when the actual application launches. BUT - the application runs in a temporary directory, and since it consumes like 5MB, I want OSX to delete it when said application quits. How can I do this? (Preferably without a helper app. The application needs as much memory as possible.)

Savir
  • 17,568
  • 15
  • 82
  • 136
Toon Link
  • 1
  • 2

1 Answers1

0

You can override method didReceiveMemoryWarning:

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

This method is call when app is run out of memory so you can remove the resources you don't need. You could remove some object from your dictionary here.

Greg
  • 25,317
  • 6
  • 53
  • 62