On Oct 7, 2009, at 2:53 PM, Michael Süssner wrote:

        NSArray *vPolyArray = [NSArray arrayWithObjects:
[[PolygonShape alloc] initWithNumberOfSides:4 minimumNumberOfSides:3 maximumNumberOfSides:7], [[PolygonShape alloc] initWithNumberOfSides:6 minimumNumberOfSides:5 maximumNumberOfSides:9], [[PolygonShape alloc] initWithNumberOfSides:11 minimumNumberOfSides:9 maximumNumberOfSides:12],
                                                 nil];

You have 3 memory leaks here.

        [vPolyArray release];

You are over-releasing this.

Read and re-read the memory management rules until you start dreaming about them. Then you will start on the path to enlightenment :-)

--
Dave Carrigan
d...@rudedog.org
Seattle, WA, USA

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to