Re: Inherited Create raises an exception/access violation ? huh ?
- From: "Skybuck" <skybuck2000@xxxxxxxxxxx>
- Date: 1 Jul 2006 15:51:36 -0700
Maarten Wiltink schreef:
"Skybuck" <skybuck2000@xxxxxxxxxxx> wrote in message
news:1151733118.018252.158400@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I was just stepping through the program and I noticed how this line
causes an access violation which I find pretty strange ?
Maybe my memory is playing tricks on me... but I thought it was normal
and safe to write code like this... even if Ttest has no
predecessor/ancestor. Or could it be a new delphi feature or bug ? ;)
constructor Ttest.Create;
begin
inherited Create; // why does this cause an access violation ? ...
Every user class has a parent class. If none is specified, it defaults
to TObject.
This behaviour could be caused by calling a static constructor on
an uninitialised object (not class) reference. That seems unlikely,
but I have no other ideas - other than 'show _all_ the code'.
All the code is present. I can vaguele remember Tobject raising an
EabstractError or so... but this is different... this is an access
violation... or maybe it's more or less the same kinda strange... I'll
investigate Tobject later on ;)
Bye,
Skybuck.
.
- Follow-Ups:
- Re: Inherited Create raises an exception/access violation ? huh ?
- From: Maarten Wiltink
- Re: Inherited Create raises an exception/access violation ? huh ?
- References:
- Many questions about partially constructed objects !!!???
- From: Skybuck
- Inherited Create raises an exception/access violation ? huh ?
- From: Skybuck
- Re: Inherited Create raises an exception/access violation ? huh ?
- From: Maarten Wiltink
- Many questions about partially constructed objects !!!???
- Prev by Date: Re: Inherited Create raises an exception/access violation ? huh ?
- Next by Date: Create, Free, Create, Free <- access violation ? Huh ?
- Previous by thread: Re: Inherited Create raises an exception/access violation ? huh ?
- Next by thread: Re: Inherited Create raises an exception/access violation ? huh ?
- Index(es):
Relevant Pages
|