title: How to dealloc a static variable declared in my header file?
body: <p>I have a -dealloc() method which I am assuming I can use to dealloc instance variables, I have another variable that is not in the instance, rather a class level variable, wondering when &amp; how I dealloc this? I can't do it in the instance method dealloc() right? Code below for reference (on varaible: levelHash):</p>
  
  <pre><code>@interface Level : CCNode 
      { 
          //Instance variables
          PlayBackgroundLayer* playBGLayer;
          PlayTilemapLayer* playTilemapLayer;
          PlayUILayer* playUILayer;
          PlayElementLayer* playElementLayer;
      }
      //Property declarations for instance variables
      @property (nonatomic, retain) PlayBackgroundLayer* playBGLayer;
      @property (nonatomic, retain) PlayTilemapLayer* playTilemapLayer;
      @property (nonatomic, retain) PlayUILayer* playUILayer;
      @property (nonatomic, retain) PlayElementLayer* playElementLayer;
  
      //Static methods
      +(void) Initialize: (NSString*) levelReference;
      +(void) InitLevel: (NSString*) levelReference;
      +(Level*) GetCurrentLevel;
  @end
  
  //static variables
  NSMutableDictionary *levelHash;
  </code></pre>
  
  <p>and my implementation:</p>
  
  <pre><code>+(void) Initialize: (NSString*) levelReference 
  {
      levelHash = [[NSMutableDictionary alloc] init];
      [levelHash setObject:NSStringFromClass([LevelOne class]) forKey:@"1"];
      //EG CALL IT [levelHash objectForKey:@"foo"];
      //WHEN DO I CALL THIS??? [levelHash release];
  }
  </code></pre>