- The best way to work is having the least amount possible of references to OEAPI objects.
- It is better to use one OEAPIObj using the objects' IDs (i.e. toolbars, buttons, menu items, folders, messages IDs).
- As soon as a OEToolbar, OEButton, OEFolder, etc. is no longer used, assign null/nothing to it.
- By a mailer's limitation, it is better to have the least amount possible of references to OEFolder objects.
- On OnShutDownOEAPI release every OEAPI object except OEAPIInit, and, at the end, call for the Garbage Collector twice:
GC.Collect()
GC.WaitForPendingFinalizers()
GC.Collect()
GC.WaitForPendingFinalizers()
- Do not call ReleaseComObject for OEAPI objects, unless its imperative.
- If an object (i.e. inbox) is to be used frequently, it is better to have a reference to the object, than working with it's ID.
- If an object (i.e. toolbar) is to be used sporadically, it is better to obtain the object by it's ID using OEAPIObj.
Developed by Nektra