I am trying to figure out a memory leak with enaml-web. When I do a bench test of thousands of requests I see the memory usage slowly creeping up.
After debugging I realized that the application must explicitly call destroy on every root enaml node or all children and proxy elements are leaked. Given it is python this seems like it should be unnecessary.
I was able to make it automatically clean up by adding a __del__ method to the Declaration and making the _parent and proxy's backref to the declaration use atomref (see https://github.com/frmdstryr/enaml/tree/atomref-decl-parent). Would it make sense to do this by default?
Edit: If this would happen to be done it would be nice to have a special atom member for typed atomref's like ForwardTypedRef or something.
I am trying to figure out a memory leak with enaml-web. When I do a bench test of thousands of requests I see the memory usage slowly creeping up.
After debugging I realized that the application must explicitly call destroy on every root enaml node or all children and proxy elements are leaked. Given it is python this seems like it should be unnecessary.
I was able to make it automatically clean up by adding a
__del__
method to the Declaration and making the _parent and proxy's backref to the declaration use atomref (see https://github.com/frmdstryr/enaml/tree/atomref-decl-parent). Would it make sense to do this by default?Edit: If this would happen to be done it would be nice to have a special atom member for typed atomref's like
ForwardTypedRef
or something.