Issue #27 new

Some leaks

hira51
created an issue

I found some leaks and fixed them. I attached the patch.

Comments (1)

  1. Anonymous

    Glad I read this issue before adding this to my project.

    Personally I would prefer just to remove the "self." and do a direct assignment because all of these seem to be in the init functions anyway (pointers should be nil at this point). When using "self." the setter is used, which retains the object, and you're passing an autoreleased object. If you assign it directly you avoid using an autorelease and the retainCount is balanced in the dealloc regardless of whether the property is "retain" or "assign". If for some reason later the property was changed to "assign" you won't loose the object by doing a direct assignment (because object ins alloc'ed in init, and released in dealloc).

  2. Log in to comment