Click here to Skip to main content
15,741,407 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
I have a child application launched from within a parent application. When I close the child through the parent, everything is fine and dandy.

However, on 64-bit Windows OS, if I close the child on its own, there's a 50/50 chance that it won't close properly.

Closing the child through the parent will work 100%. But if I close the child by clicking the 'X', the GUI is closed but the Process remains running in Task Manager.

Additional information: when I run the debug version of the application, the problem doesn't occur. Right now I'm thinking it maybe some resources that I'm not freeing up.

Has anyone seen this behaviour and know how to resolve it?

Thanks!
Alex
Posted
Updated 14-Apr-10 13:04pm
v2
Comments
Albert Holguin 11-Feb-11 21:07pm    
check your destructors and make sure everything is being closed and memory is cleaned correctly. i've had this occur when an independent thread failed to close, make sure that if you have multiple threads they all close when you told them to, otherwise force them down.

I have never seen this before.Maybe your application has some mistakes.
 
Share this answer
 
It may very well be a mistake within our application. However, I'm still not sure what kind of errors would result in this behaviour. I'm suspecting something in the destructor different between the 64 and the 32 bit versions of windows, and perhaps some handles aren't always released properly.

To put things in context, our application are using a lot of legacy technology, eg. Borland OWLNext, DDE, etc. And there have been quite a few reports of similar problems, but those normally aren't reported on a developer forum.

If anyone would like me to clarify the problem a bit more, please let me know. Thanks!
 
Share this answer
 
I think I'm able to resolve it now. The process appears to hang on the deletion of a CControlBar object.

Commenting it out works fine, as well as moving it to a later position in the block.

STILL, as a learning experience, I'd like to ask if any one knows why this might happen, and why only on a 64-bit OS?
 
Share this answer
 
Comments
Albert Holguin 11-Feb-11 22:55pm    
I just noticed this section after commenting above (sorry!).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900