Ask Your Question

delete TransformListener object in python to release computational resource

asked 2016-11-02 12:31:59 -0500

Mike Gao gravatar image

updated 2016-11-02 12:32:38 -0500

Hello! Recently I notice that, after I create a TransformListener object in a class in python, e.g.: = TransformListener(),

the created tf object gets stuck in the memory, even I try deleting it in the "__del__(self)" method of the class with:

del = None,

it does not work. The TransformListener object is used by a method of this class. The problem is that when I continue to create the object of this class (which is called by another class during operation), the TransformListener objects accumulate and occupy the computational resources. Thus my question is that how I can get rid of it to free the unnecessarily occupied resources? I appreciate any answers and suggestions in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-11-02 13:30:26 -0500

tfoote gravatar image

There may be something not cleaning up properly, but python does not necessarily clean up when del is called.

Here are some more resources if you want to dig in deeper:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-11-02 12:31:59 -0500

Seen: 119 times

Last updated: Nov 02 '16