Re: problem with destructor
From: bArT (bart212_at_poczta.onet.pl)
Date: 07/29/04
- Next message: Aatu Koskensilta: "Re: Yet another Attempt at Disproving the Halting Problem"
- Previous message: Chris Menzel: "Re: Yet another Attempt at Disproving the Halting Problem"
- In reply to: John Harrison: "Re: problem with destructor"
- Next in thread: Karl Heinz Buchegger: "Re: problem with destructor"
- Reply: Karl Heinz Buchegger: "Re: problem with destructor"
- Reply: Andre Kostur: "Re: problem with destructor"
- Reply: Karl Heinz Buchegger: "Re: problem with destructor"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Jul 2004 19:45:51 +0200
When I deleted all methods except constructor and destructor I still have
the same error. So other methods can't cause a problem but only this
destructor or constructor.
I can't add private assigment operator, because I have such error: "function
'class CSmtp &__thiscall CSmtp::operator =(const class CSmtp &)' already has
a body".
What is Your advice?
bart
>
> Well the first thing to note is that you because it crashes in the
> destructor does not mean that the problem is with the destructor (or
> constructor). I'd like to know how you've established that the other
> methods don't have a bearing because that is the first place I would be
> looking.
>
> The only way to be sure that the problem is not with the other methods
> would be to remove them entirely and still find that the program crashed.
> Have you tried that?
>
> But the first thing to do however it to take Karl's advice and add a
> private copy constructor and a private assignment operator. If doing that
> causes a compile or link error then you've found your problem. Its very
> quick to do and to be honest should have been done already. (I'm assuming
> here that the copy constructor and assignment operator aren't two of the
> methods that you left out in your post.)
>
> If that doesn't work then I think you are reduced to cutting out whole
> sections of code until you can isolate the section that is causing the
> problem. Remember that it could be anywhere, just because the code crashes
> in the destructor of one class, does not mean that is where the problem
is.
>
> Unfortunately there is nothing fatally wrong with the code you've posted
> (that I can see). So you are going to have to hunt around or post some
> more code.
>
> john
- Next message: Aatu Koskensilta: "Re: Yet another Attempt at Disproving the Halting Problem"
- Previous message: Chris Menzel: "Re: Yet another Attempt at Disproving the Halting Problem"
- In reply to: John Harrison: "Re: problem with destructor"
- Next in thread: Karl Heinz Buchegger: "Re: problem with destructor"
- Reply: Karl Heinz Buchegger: "Re: problem with destructor"
- Reply: Andre Kostur: "Re: problem with destructor"
- Reply: Karl Heinz Buchegger: "Re: problem with destructor"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|