To Free Ole Object

In my program I'm using
var V : Variant;

V := GetActiveOleObject('Word.Basic');

Should I free this object and how can I do this?
Will V.Free do this?

jpenevAsked:
Who is Participating?
 
john_mConnect With a Mentor Commented:
Setting

  V := nil;

should do it. In doing this the OLE object decrements it's internal reference count, and if the referece count is zero then it will be released by the operating system.
0
 
john_mCommented:
Sorry, should have compiled the answer first - using variants it should be

  V := null;


Regards,

John.


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.