From: "Mauro Toniolo" Newsgroups: comp.os.msdos.djgpp Subject: Class undestructible !!! Date: Fri, 6 Mar 1998 18:54:48 +0100 Organization: Telecom Italia Net Lines: 249 Message-ID: <6dpdau$6ql@everest.vol.it> NNTP-Posting-Host: venezia7-96.tin.it To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I have created a class to handle with the matrixes. When I compile a listing that uses the class with the default destroyer, after a few iteration I get an overflow memory error. Surely, it's due by the wrong management of the memory with this kind of destroyer. But if I define a destroyer like the following, I get the error below NOT in compiling time BUT in executing time. Why? HOW CAN I DESTROY THAT OBJECT? My compile line is : gxx -o %1.exe %1.cpp ; while the OS is Windows95 OSR2. I run my executables in a Dos Windows. Please help me as soon as possible. Mauro Attached you can find the class I wrote: -------------------- Exiting due to signal SIGSEGV General Protection Fault at eip=00014f3e eax=89024a00 ebx=890249fc ecx=89024a00 edx=0006716e esi=00000054 edi=00024344 ebp=000640f8 esp=000640f4 cs=00a7 ds=00af es=00af fs=0087 gs=00c7 ss=00af Call frame traceback EIPs: 0x00014f3e 0x00013e28 0x00001dec 0x000040d1 0x0001485b begin 666 matrice.h M(VEN8VQU9&4@/&UA=&@N:#X-"B-I;F-L=61E(#QS=&1L:6(N:#X-"B-I;F-L M=61E(#QT:6UE+F@^#0H-"@T*8VQAPT*<')I=F%T93H- M"@EI;G0@"AV;VED*3L-"@ED;W5B;&4@;6EN*'9O:60I.PT*"61O=6)L M92!M961I82AV;VED*3L-"@ED;W5B;&4@=&]T86QE*'9O:60I.PT*"79O:60@ MFEA;&EZ>F$@82!)3DE4 M('1U='1I(&=L:2!E;&5M96YT:0T*#0IM871R:6-E.CIM871R:6-E*&EN="!R M+"!I;G0 AT 8RP@9&]U8FQE(&EN:70I#0I[#0IR:6<@/2!R.PT*8V]L(#T AT 8SL- M"FUE;6)R;SUN97<@9&]U8FQE*EMR73L-"F9O" \('(@ M.R!X*RLI#0H)>PT*"6UE;6)R;UMX73UN97<@9&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