Help save net neutrality! Learn more.

#13 Check for memory leaks


A message on the Clips Developer Forum
( 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.


  • Francesco Garosi

    • status: open --> closed
  • Francesco Garosi

    Logged In: YES

    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

    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.


Log in to post a comment.