INTERACT FORUM

Windows => Plug-in Development => Topic started by: KingSparta on October 05, 2004, 09:48:55 am

Title: MC Does Not Terminate, Why?
Post by: KingSparta on October 05, 2004, 09:48:55 am
I Am Trying to Figure Out Why One Of My Plug-ins Will Not allow MC to terminate.

If You Enter The Plug-in and terminate MC by clicking on the [ X ]

MC will continue to run in the task manager, MC will vanish however.

after that if you load mc back up it loads up back in the plug-in where it left off (i don't think it should do this)

==========================================

if you exit the plug-in by clicking on playing now and then terminating MC, MC terminates fine.

the plug-in is not in a loop or anything just setting there waiting

is there something i can do to terminate the plug-in when a user exits MC  when the user is in the plug-in?
Title: Re:MC Does Not Terminate, Why?
Post by: RhinoBanga on October 05, 2004, 01:20:18 pm
Could it be that you have a handle to an MJ object in a global variable somewhere?

Can you reproduce the issue with a simple app?
Title: Re:MC Does Not Terminate, Why?
Post by: KingSparta on October 05, 2004, 03:17:21 pm
Could it be that you have a handle to an MJ object in a global variable somewhere?

Can you reproduce the issue with a simple app?

Maybe so, how would I close it?
Title: Re:MC Does Not Terminate, Why?
Post by: RhinoBanga on October 06, 2004, 12:39:45 am
By making sure you don't hold onto any objects.

COM objects are referencing counting, i.e. they count how many people have copies of them.   This makes sure that the memory is only released when all accessors of the object are finished with the data.   So I suspect your issue is that you are holding onto an object which is preventing MC from closing down since it "knows" that someone, i.e. you, is holding onto some of it's data.