Rhoana / butterfly

Documentation
http://butterfly.rtfd.io
MIT License
2 stars 5 forks source link

Memory leak #31

Closed thejohnhoffer closed 7 years ago

thejohnhoffer commented 7 years ago

Found and fixed memory leak at line 156 of UtilityLayer/Keywords.py due to passing list of database table ['neuron','synapse'] by reference instead of by values.

The reference to this list gets passed as the LIST keyword of the NamelessStruct RUNTIME.DB.TABLE. The internals of the NamelessStruct in Line 19 of UtilityLayer/Structures.py add each keyword argument NAME to the LIST keyword before adding unique vaules for self.LIST.

Although in NamelessStruct self.LIST contains only unique values, the original reference passed as the keyword argument LIST continues to accumulate values. This issue can be fixed by using python's [:] notation to create a copy of the list.