Method called when a study is removed from a chart

CDK

New member
Joined
Jul 13, 2021
Posts
3
Likes
0
Is there a SDK method that is called when a study is removed from a chart? Need to clean up resources but only want to do this when the study is actually removed. I tried public void destroy() (which is indeed called when the study is removed) but, for some strange reason, it is also being called after all historical data has been processed by the calculate method. I see we have an onLoad() method....is there a onUnLoad() counterpart?
 

jibanes

Member
Joined
Jul 16, 2019
Posts
23
Likes
0
I'm also puzzled as I do not seem to find a method to do that. I've tried destroy() as you pointed out, but same behavior as you've described it, it gets invoked for multiple reasons?
 
Last edited:

Spin

Well-known member
Joined
May 22, 2019
Posts
477
Likes
191
Have been struggling with this too in the past. Never came up with a decent solution.

Will watch this thread for light to shine at the end of the tunnel :)
 
Top