Code: Select all
from neuron import h
s = h.Section()
c = h.IClamp(0.5, s)
g = c.get_segment()
del s
del c
del g
print "Sections:", len(list(h.allsec()))
print "IClamps: ", len(list(h.List('IClamp')))
Code: Select all
Sections: 1
IClamps: 1
I've tried using `gc.collect()` and `sys.exc_clear()`. I also tried using `gc.get_referrers()` to see where the references might be but the lists come back empty, so I assume the leak is internal to NEURON?