API Support Forum
OEC API > API Support > CustomIndicator life time events
Author Topic: CustomIndicator life time events
(2 messages, Page 1 of 1)
Moderators: VPfau
MOved
Posts: 3
Joined: Mar 29, 2013


Posted: Mar 29, 2013 @ 03:18 PM             Msg. 1 of 2
Hi

Before CustomIndicator is released and no longer used I need to release some resource in external DLL

I see in the generated code
protected override void Reinitialize()

and in the help
public override Void Delete();
public Void PostCalculate();

but the help say nothing about them

When they are called?

1) what should I use in order to release resources?
2) when Reinitialize() is called I suspect I need to release and allocate internal resources again if called, but not sure.
3) any other things I need to know about CustomIndicator life cycle.

Muly

Muly Oved
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Apr 02, 2013 @ 08:39 AM             Msg. 2 of 2
Hello,

You need to use Delete() method to release resources.

Reinitialize() is called before recalculation of complete history: it can be as the first time recalculation as well as backfilling of history, symbol/parameters changes, time frame change. So, you will need to take it into account to avoid unnecessary reallocation.

Victor Vins
Lead Software Developer