Code Monkey home page Code Monkey logo

Comments (5)

FunkyM avatar FunkyM commented on May 29, 2024

Yes, confirmed.
It looks like the only real solution is to introduce a libplist_init|deinit() due to libxml2's API design as without the cleanup memory will leak.

from libplist.

nikias avatar nikias commented on May 29, 2024

See also #57

from libplist.

nikias avatar nikias commented on May 29, 2024

Following up on my suggestion with a protecting mutex I didn't take into account that it isn't really solving the problem. @FunkyM you are right with init/deinit. I will take care of that.

from libplist.

greg-dennis avatar greg-dennis commented on May 29, 2024

Aha, this is causing libimobiledevice/ideviceinstaller#41.

Simply dropping this section would probably be alright. In a multi-threaded environment, libxml recommends either calling xmlCleanupParser once before program exit or simply not calling it at all. See: "In case of doubt abstain from calling this function or do it just before calling exit() to avoid leak reports from valgrind". Even though you may get a leak report from valgrind, I don't see it as a genuine leak. Yes, some global state may hang around for longer than necessary, but I don't think there's some continued accumulation of that memory over time.

If you do add something, I think you only need a deinit, as the lazy init is taken care of for you by libxml.

from libplist.

nikias avatar nikias commented on May 29, 2024

I accepted the pull request #73 for now to work around this problem.

from libplist.

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.