TObject.InstanceSize returns 8, yet TObject doesn't declare any data members. According to the implementation of TObject.ClassType, the first 4 bytes can be explained as a pointer to the object's TClass metadata. Anyone know what the other 4 bytes of overhead are there for?
EDIT: Apparently this is specific to D2009. In older versions...
I have a procedure that expects a parameter of type TObject, something like this:
MyProcedure (const AValue : TObject);
I have an array of Variant that I'm looping through to call the procedure, something like this:
for i:=0 to High(myArray) do
MyProcedure (myArray[i]);
The compiler gives an error saying: "Incompatible types:...
Hi guys,
how can i make my code to work ? :) i`ve tried to formulate this question but after several failed attempts i think you guys will spot the problem faster looking at the code than reading my 'explanations'. thank you.
setCtrlState([ memo1, edit1, button1], False);
_
procedure setCtrlState(objs: array of TObject; bState: boo...
Hi,
I'm currently working with CodeGear Delphi 2007 under Vista.
My application returns out of memory error during some rather heavy calculations.
The .exe files grows from 150 Mb to an amazing 2 Gb (! LOL )
Regarding this issue:
1) I'm changing some arrays into arraylist
BUT It's giving me some rather difficult issues to re...
I currently have this, and it sucks:
type TpointArray = array [0..3] of Tpoint;
class function rotationTable.offsets(pType, rotState, dir: integer): TpointArray;
begin
Result[0] := point(1, 1);
Result[1] := point(1, 2);
Result[2] := point(1, 1);
Result[3] := point(1, 1);
end;
but instead, i want to do something like this:
c...