Article View: comp.windows.ms.programmer
Article #491Destructor problem in a DLL
From: Arto Kujala
Date: Mon, 14 Sep 1992 12:29
Date: Mon, 14 Sep 1992 12:29
24 lines
1216 bytes
1216 bytes
I am programming a windows DLL with Borland C++, OWL and Classlibs.
The DLL is used from a VB application. When closing the DLL, there is
the following problem:
I have a class, that can not use its own data in its own destructor
without a runtime error ("An error has occured..." and sometimes
a General Protection Fault).
For example, this class (Drawings) has a private
variable xSize:
class Drawings {
private:
int xSize;
...
If I try to copy xSize (int theSize = xSize) in destructor of Drawings,
a "An error has occured..." dialog box is given. All other variables
of the class seem to be in same state.
What could be wrong in my code? I noticed
that WEP is called before the destructor (my WEP does nothing).
--Arto
Technical Details
Message-ID:
<BuKIps.Cps@tik.vtt.fi>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!sdd.hp.com!uakari.primate.wisc.edu!tik.vtt.fi!akuShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!sdd.hp.com!uakari.primate.wisc.edu!tik.vtt.fi!aku From: aku@tik.vtt.fi (Arto Kujala) Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc Subject: Destructor problem in a DLL Message-ID: <BuKIps.Cps@tik.vtt.fi> Date: 14 Sep 92 12:29:51 GMT Sender: aku@tik.vtt.fi (Arto Kujala) Organization: Technical Research Centre of Finland, Laboratory for Information Processing (VTT/TIK) Lines: 24