The following code leaks about 77 bytes per loop (7664 kB after 100000 loops).
t = clips.BuildTemplate("foo", "")
f = t.BuildFact()
The following similar code does not leak:
f = clips.Assert("(foo)")
If #define USE_NONASSERT_CLIPSGCLOCK is commented out in clipsmodule.h the memory is not leaked.
Apparently the problem is related to the hashtables used to track unasserted facts.