I’m currently wondering about action managers and pointer drag behaviors as resources (I hope I did not miss it in the documentation). We currently use several instances of action managers and pointer drag behaviors at the same time, e. g. when a new complex object is added, a new action manager and a new pointer drag behavior are created as well.
Since PointerDragBehavior creates a drag plane, I assume that it consumes resources. I checked the code - the drag plane is disposed when the scene is disposed. Do we pollute the memory if we create a lot of those behaviors? I did not find a dispose method on the behavior. Should I reuse them, can I apply the same behavior / action manager to multiple meshes at the same time? Or is there a method to dispose them when they are not used anymore?
I checked the code in the pointer drag behavior - the dragPlane is not disposed during detach, only some observers are removed. So you think the remaining drag planes are not an issue?
so it will get disposed only when the main scene has been disposed. I do not think it consumes much memory but still I wonder if we could improve it, @Cedric ?