Git Product home page Git Product logo

Comments (6)

kgn avatar kgn commented on July 28, 2024

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).

from inappsettings.

kgn avatar kgn commented on July 28, 2024

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

patch: https://bitbucket-assetroot.s3.amazonaws.com/keegan3d/inappsettings/20101015/27/InAppSettings.20101014.diff

from inappsettings.

kgn avatar kgn commented on July 28, 2024

From and email:
I’ve found that Instruments/leak detection is finding a number of leaks, even when using sample app. I’m hoping it is something I am doing incorrectly here.
For example, when I init default values from my app delegate, leaks are reported in the in the InAppSetttingsRegisterDefaults loadFile function. There are 12 leaks reported. It appears that the retain count of ‘setting’ is 2 immediately before its release.
I’d appreciate any suggestions you may have.

from inappsettings.

tblack2200 avatar tblack2200 commented on July 28, 2024

I had posted this original message back on June 2 and was wondering if you would have an updated version of the code soon with the memory leaks fixed?

Thanks

from inappsettings.

kgn avatar kgn commented on July 28, 2024

I haven't been writing iOS apps recently so I haven't looked into this issue.

from inappsettings.

kgn avatar kgn commented on July 28, 2024

I'll need to look into this, hopefully it's fixed with ARC

from inappsettings.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.