#13 Check for memory leaks

Approved
closed
9
2005-03-01
2005-02-10
Francesco Garosi
No

A message on the Clips Developer Forum
(http://www.cpbinc.com/clips/index.php) made me
rethink of checking memory leaks on current PyCLIPS
implementation. I spotted some possibilities of memory
leaks in structures not directly handled by Python:
before releasing the final version, I will try to force
Python to call all possible destroyers on all PyCLIPS
structures. Maybe I'll need to implement some terrible
hacks for this...

Sorry for those who were waiting for the stable release
(especially for me): we will still have to wait a little.

Discussion

    • status: open --> closed
     
  • Logged In: YES
    user_id=328337

    The leaks that could be caused by code in the CLIPS
    interface module (clipsmodule.c) have been found and
    removed; moreover a mechanism to force module finalization
    and a call to DeallocateEnvironmentData on module exit has
    been implemented, although it caused adding some unusable
    symbols in the low-level module namespace. Other
    suspicious "non-free" pointers have been found, which are
    directly handled by the Python memory management system
    and thus are not forced to follow the usual alloc/free
    mechanism.

    I think that the close hunt for memory leaks can be
    considered over. Nevertheless the module is actively
    developed, and hunting possible unexpected behaviours
    (including memory problems) is strongly encouraged for all
    users and developers.