When to use Quit() and RefreshAll() in OLE Automation object model?

In the documentation of OLE Automation object model, there are 2 methods Quit() and RefreshAll() that I cannot find explanation. Are there other web-links for the documentation or further sample examples?

https://www.amibroker.com/guide/objects.html

If I do not run Quit() after creating an Amibroker object below, will it lead to memory leak? What is the best practice?
AB = new ActiveXObject( "Broker.Application" );

What is the purpose of RefreshAll()?

First: do not use OLE from within AmiBroker.
It should be used from THE OUTSIDE (like external JScript)
Second just do NOT call Quit() unless you really want to EXIT APPLICATION IMMEDIATELY. It closes the application.
Third: RefreshAll does what it says causes “refresh all” (the same as View->Refresh All).
It is only useful AFTER IMPORT via OLE.

From within AmIBroker you should use RequestTimedRefresh or RequestMouseMoveRefresh.

1 Like