Browse Source

break ParamObj garbage cycle

Darren Ranalli 18 years ago
parent
commit
b3f7067483
1 changed files with 2 additions and 2 deletions
  1. 2 2
      direct/src/showbase/PythonUtil.py

+ 2 - 2
direct/src/showbase/PythonUtil.py

@@ -1301,8 +1301,8 @@ class ParamObj:
             # install a setter stub that will a) call the real setter and
             # then the applier, or b) call the setter and queue the
             # applier, depending on whether our params are locked
-            self.__dict__[setterName] = Functor(setterStub, param,
-                                                setterFunc, self)
+            setattr(self, setterName, new.instancemethod(
+                Functor(setterStub, param, setterFunc), self, self.__class__))
 
         if params is not None:
             params.applyTo(self)