ReleaseInt

[Top]  [Chapter]  [Previous]  [Next]

This method (it is exclusive to the .NET assembly) releases a reference to a programming interface which was retrieved from TextDynamic.

 

It is necessary to use this method at the end of the methods which use an interface to make sure the garbage collection frees the interface at once. Otherwise, when the editor has been disposed already, it can happen that the garbage collection accesses memory which has been freed.

 

Example:

IWPMemo Memo = wpdllint1.Memo;

IWPTextCursor TextCursor = Memo.TextCursor;

 

TextCursor.InputText("Hello World");

Memo.Reformat();

 

wpdllint1.ReleaseInt(TextCursor);

wpdllint1.ReleaseInt(Memo);

 

Note: All interfaces passed as event parameters are automatically released.


[releaseint_2.htm]    Copyright © 2007 by WPCubed GmbH