Bug #3191: Readily reproducible memory leak - FC doesn't reclaim memory on object deletion / project close

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Bug #3191: Readily reproducible memory leak - FC doesn't reclaim memory on object deletion / project close

Post by Kunda1 »

issue #3191: Readily reproducible memory leak - FreeCAD doesn't reclaim memory on object deletion / project close.

Description
As in the summary. Deleting objects and closing projects doesn't free memory. Eventually FreeCAD will run the system out of memory when you keep repeating the same workflow.

Steps To Reproduce (for attachments see issue #3191)
1. Save the attached .dae file in /tmp
2. Run the attached python workflow in the console (you'll see some errors at the end due to a different bug related to unicode, but they don't matter)
3. Note the memory usage in top.
4. Close the project (without closing FreeCAD) and go back to step 2.

Each time, on my system at least, it consumes an additional ~ 10% memory. And right now I'm using a rather simplified model.

In addition to closing projects not freeing memory, manually deleting individual objects doesn't appear to free memory either. The only thing that ever seems to get the memory back is closing and restarting FreeCAD.

Additional Information
OS: "Fedora release 24 (Twenty Four)"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12122 (Git)
Build type: Unknown
Branch: master
Hash: 501729a84cd0aeef0ae2fcf24cc832eafaf0fa13
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17
Locale: Icelandic/Iceland (is_IS)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply