Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!uflorida!travis!tom From: tom@ssd.csd.harris.com (Tom Horsley) Newsgroups: comp.lang.c++ Subject: Re: Constructor called with reference to self? Message-ID: Date: 3 Nov 90 03:53:32 GMT References: <39359@ucbvax.BERKELEY.EDU> Sender: news@travis.csd.harris.com Organization: Harris Computer Systems Division Lines: 20 In-reply-to: jbuck@galileo.berkeley.edu's message of 3 Nov 90 00:34:30 GMT >What's probably happened is that your program has a memory allocation bug. >Specifically, you've deleted an object but you still have a pointer to >it lying around, so you're trying to use an object that you have deleted. >Neophytes always think they've found a compiler bug when this bites them. Yep. I would agree that this is a very likely thing to happen except for the fact that all my class instances are 'auto' storage class, I am not using new or delete (to create classes) anywhere. The more I look at it, the more it looks like Turbo C++ is re-using one of the temps it created for evaluation of the expression (involving overloaded operators) before the lifetime of that temp actually expired. -- ====================================================================== domain: tahorsley@csd.harris.com USMail: Tom Horsley uucp: ...!uunet!hcx1!tahorsley 511 Kingbird Circle Delray Beach, FL 33444 +==== Censorship is the only form of Obscenity ======================+ | (Wait, I forgot government tobacco subsidies...) | +====================================================================+