|
-
July 21st, 2005, 11:00 PM
#1
memory access error
I have two static global instances (say gO1 and gO2)of two different classes, gO1 is in the Library and gO2 is in the main application. What happens is, after the execution of main(), the destructor for the gO1 is called first and it cleans up the allocated memory. Then destructor for the gO2 is called. The destructor of gO2 is making a call to the library which in turn tries to access the gO1. Since it was freed already it's raising an application error.
Please suggest how better to resolve this issue.
Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|