Code: Select all
SongsDB.SDBApplicationClass SDB = new SongsDB.SDBApplicationClass();
Moderator: Gurus
Code: Select all
SongsDB.SDBApplicationClass SDB = new SongsDB.SDBApplicationClass();
Code: Select all
SDB := CreateOleObject('SongsDB.SDBApplication');
// Free variable to avoid COM Warning
SDB := Nil;
Code: Select all
private void ScreenSaverForm_FormClosed(object sender, FormClosedEventArgs e)
{
try
{
Marshal.FinalReleaseComObject(SDB); // Don't (shouldn't be necessary)
SDB = null;
GC.Collect(); // Also not recommended
GC.WaitForPendingFinalizers(); // Yeah, same as before.
Process.GetCurrentProcess().Kill(); // Don't do this!!!
}
catch { }
}