Answer the question
In order to leave comments, you need to log in
Why access violation in the constructor?
Created this class:
type
Painter = class
public
constructor Create();
private
sprite: TBitmap;
end;
constructor Painter.Create();
begin
sprite := TBitmap.Create;
end;
First chance exception at $005D94B0. Exception class $C0000005 with message 'access violation at 0x005d94b0: write of address 0x00000004'. Process Plan2D.exe (1248)
Answer the question
In order to leave comments, you need to log in
And why did you decide that the error is in this constructor? Specifically, this ten lines does not cause any errors, the object is completely created for itself. Here the destructor is not enough for him, no one releases the sprite.
Exception class $C0000005This is a RAD Studio bug. It says it's been fixed .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question