Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > C++ static destructor guaranteed to be called?

Reply
Thread Tools

C++ static destructor guaranteed to be called?

 
 
Mike Schilling
Guest
Posts: n/a
 
      10-19-2005

"Roedy Green" <(E-Mail Removed) > wrote in
message news(E-Mail Removed)...
> On Thu, 13 Oct 2005 05:39:47 GMT, Chris Head <(E-Mail Removed)>
> wrote or quoted :
>
>>In a Win32 DLL, there is a
>>magic entry point which is automatically invoked by the operating system
>>immediately after the DLL loads and immediately before it unloads

>
> But DLLs can hang around for a long time after the app closes right?
> So how does that work?


In Windows 3.x, DLLs owned resources and memory themselves, so what you
describe was an issue. In 32-bit Windows, resource ownership is (more
sensibly) per-process, and loading/unloading means "into a process's address
space", so the fact that the same DLL may be in use by another process is
unimportant.


 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      10-22-2005
On Wed, 19 Oct 2005 14:50:09 GMT, "Mike Schilling"
<(E-Mail Removed)> wrote or quoted :

>In Windows 3.x, DLLs owned resources and memory themselves, so what you
>describe was an issue. In 32-bit Windows, resource ownership is (more
>sensibly) per-process, and loading/unloading means "into a process's address
>space", so the fact that the same DLL may be in use by another process is
>unimportant.


Thanks. I did not know they had dropped the common data area.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie -- smart pointer destructor called without destructor everbeing called Jimmy Hartzell C++ 2 05-20-2008 02:20 AM
newbie -- smart pointer destructor called without destructor everbeing called Jimmy Hartzell C++ 0 05-19-2008 07:05 PM
compiler generated destructor vs class implemented destructor arun C++ 2 06-13-2006 05:43 AM
Explicit destructor calls from inside base class destructor frs C++ 20 09-21-2005 09:22 AM
Is the order of static block execution guaranteed ? Razvan Java 5 09-09-2004 06:40 PM



Advertisments