Lonkero hit the nail on the head ... you should build-in a gracefull shutdown if you need it, like this:

$object.quit

then ask kix to perform a COM Release on your object, like this:

$object = 0

but ultimately, its up you (your component) to unload itself memory if it's reference count drops to zero, especially for out-of-proc COM objects like you have.

-Shawn