#import "Foo.h"

@implementation Foo

@synthesize bar;

- (id) init
{
   self = [super init];

   if(self)
   {
      self.bar = [NSDictionary dictionary];
   }

   return self;
}

-(void) setBar:(NSDictionary *)newBar
{
   NSDictionary *oldDictionary = self.bar;
   bar = [newBar retain];
   [oldDictionary release];

   NSNotification *note = [NSNotification notificationWithName:@"barUpdated"
                                                        object:self];
   [[NSNotificationCenter defaultCenter] postNotification:note];
}

-(void) dealloc
{
   self.bar = nil;
   [super dealloc];
}

@end
