Open rickj33 opened 8 years ago
Good point. I'm not sure of the answer off hand, but adding cleanup code seems like a good idea. I'll do some more research, though. In general I've been bad at worrying about JS GC, but perhaps I need to think about it more.
I have implemented a custom color function derived from L.PiecewiseFunction, similar to the L.CustomColorFunction, In my implementation I implemented a destroy() method to handle cleaning up some references. As I started going though the code, I noticed that the pre and post Process variables are never set to null. If I set those variables by using functions on another object, when gc ran I am assuming it would not be able to release the the object which provided the functions to use.
I could be wrong, but wanted to ask
Thanks