PDA

View Full Version : Freeing objects created with CreateObject()



StefanPaetow
10-07-2002, 10:03 AM
Hi,

am I right in assuming that I can free objects created with CreateObject() by setting them to NULL, or will that lead to memory leaks?

If there is a function that disposes of objects instantiated from the existing objects on a machine (WindowsInstaller.Installer or SQLDMO.SQLServer for example), please let me know what it is. I'd rather like to make calls to clean up after myself than having InstallShield do it.

Regards

Stefan

RobertDickau
10-11-2002, 10:45 AM
I think the NOTHING constant is what you'll want:


set oMSI = CoCreateObject("WindowsInstaller.Installer");
MessageBox("MSI version = " + oMSI.Version, INFORMATION);
set oMSI = NOTHING;