Can't delete point process after accessing range variable

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
lcampagn
Posts: 22
Joined: Mon Jul 07, 2014 1:12 pm

Can't delete point process after accessing range variable

Post by lcampagn »

Greetings,
I have a problem where point processes are not being removed from NEURON (7.3) even though all python references are apparently lost. Here is my simple point process:

Code: Select all

NEURON {
	POINT_PROCESS TestPointProc
	RANGE rangeval
}

ASSIGNED {
	rangeval (1) 
}
..and a script that demonstrates the problem:

Code: Select all

import neuron

s = neuron.h.Section()
m = neuron.h.TestPointProc(0.5, sec=s)
assert len(neuron.h.List('TestPointProc')) == 1

# test executes correctly if this line is removed:
m.rangeval

del m
assert len(neuron.h.List('TestPointProc')) == 0
Any hints for me?
Thanks!
lcampagn
Posts: 22
Joined: Mon Jul 07, 2014 1:12 pm

Re: Can't delete point process after accessing range variabl

Post by lcampagn »

I'm sorry, this is just a duplicate of my previous report: viewtopic.php?f=2&t=3221
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Can't delete point process after accessing range variabl

Post by hines »

I don't have a good fix for this problem. maybe someday...
Until then, the only work around is to call a method on any hoc object. eg h.Vector().size() to tickle the system into freeing the previous "hoc_pop_defer" reference.
Post Reply