>One of the major problems that was probably overlooked by most solutions
>(including the JustOne32 component), is what happens if your app
>crashes.  
>
>For instance if your method creates something such as the global atom
>below (or memory mapped files etc), then removes it on the FormDestroy
>method, then what happens if you application dies with out hitting the
>form destroy?  
>I have had a couple of commerical applications crash and it is annoying
>to have to reboot to restart the app. Of course we being such fantastic
>programmers our apps never crash so it not such a problem...<g>   
>
>Basically the best solution is search through the list of windows and
>check if your window is still running.  I should really wrap the code up
>into a component & redistribute it someday but it is code developed in
>work time...


How about using TApplication.OnException to trap any unhandled exceptions
and release the Atom.  Rather than having the Atom Form dependant add your
own exit procedure to trap application exit and if the atom exists remove it.

So normal termination the exit procedure will release the Atom and abnormal
temination the OnException trap will release the Atom.

Comments

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to