Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: Memory Leaks

  1. #11
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    Quote Originally Posted by jairbubbles
    I do DAE::cleanup() at the end of the export.
    I could be wrong but I think you're supposed to do that only after you're completely done with the dom. So if you export, then call cleanup, then try to use the dom again, it's likely you'll have problems.

    Having to call cleanup manually is error prone, but I'm not sure of a better way. Cleaning up global resources is a huge pain in C++.

  2. #12
    Junior Member
    Join Date
    Apr 2006
    Posts
    27
    Well, after I am done with a function I want everything to be clean as if nothing has happened.

    Anyway, if I remove the DAE::cleanup() it's even worse.

  3. #13
    Junior Member
    Join Date
    Nov 2006
    Location
    Osaka, Japan
    Posts
    4

    A fix...

    I've fixed the code so DAE::cleanup() removes all objects from the memory, including all the static objects.

    You can grab the code from my iDisk.
    http://idisk.mac.com/saint_nus-Public/C ... 1.4.tar.gz

    This fix is based on the SVN trunk revision 44.
    Also fix the memory leak in daeURI caused by not freeing the string before assigning the new one.
    I hope this fixes all memory leaks.
    //! @Author Nus
    //! Capcom, JAPAN

  4. #14
    Junior Member
    Join Date
    Apr 2006
    Posts
    27
    I tried your version and it crashed the first import. Have you only made changes for the dae::cleanup ?

    I think it's due to the fact that I was using revision 34.

    Each time I update, a new stuff is buggy.

  5. #15
    Junior Member
    Join Date
    Nov 2006
    Location
    Osaka, Japan
    Posts
    4
    I've fixed several stuff actually. You can search for the word "Nus", I think I marked all the changes I made.
    //! @Author Nus
    //! Capcom, JAPAN

  6. #16
    Junior Member
    Join Date
    Apr 2006
    Posts
    27
    I took the SVN 45 revision and I have the same problems : several Get Functions returning weird values.
    I can't test your changes, I'm sorry.
    I was thinking it was maybe the baginning of a stable version but it's even worse ^^

  7. #17
    Senior Member
    Join Date
    Aug 2005
    Location
    California
    Posts
    165
    This might have been my fault.

    The codegenerator has a bug in it. And SThomas had fixed some spots by hand where it failed (some things like domInstance_camera, domInstance_node) but I forgot to put those fixed lines back in after regenerating the code.

    I will put those in and test these changes.

    -Andy

  8. #18
    Junior Member
    Join Date
    Nov 2006
    Location
    Osaka, Japan
    Posts
    4

    Can you please clean the memory?

    The original COLLADA doesn't really care about the static objects. There are a lot of static objects that being constructed once and never being released even if I call DAE::cleanup(). For programming in consoles (in my case Wii, XB360, PS3), I must have a very clean memory. I hope the next release of COLLADA will address this problem...
    //! @Author Nus
    //! Capcom, JAPAN

  9. #19
    Senior Member
    Join Date
    Aug 2005
    Location
    California
    Posts
    165
    saint_nus,
    Did the fix you posted on the forum fix all the static object memory leaks?

    Are you using COLLADA for a delivery format for console games??
    I sure hope not. But as part of the pipeline its probably using COLLADA DOM for a fast path loader for the engine before conditioning all the assets into your own format. Is that the case?

    Also please respond to my p.m. asap. I am trying to create a new package to release any day now. To include your changes in that release I need to hear back from you.

    Thanks,
    -Andy

  10. #20
    Junior Member
    Join Date
    Nov 2006
    Location
    Osaka, Japan
    Posts
    4

    Of course not...

    Of course, I don't include COLLADA in my engine.
    But for my test programs, I usually include COLLADA and I have to know that if my program is leaking or not. For me, COLLADA is quite convenient for supplying data to my tests before making my own data.

    >>Did the fix you posted on the forum fix all the static object memory leaks?
    The fix that I posted fix all the static object memory leaks.
    //! @Author Nus
    //! Capcom, JAPAN

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •