[patch_done] ZVariant

Code patches written by our users to solve certain "problems" that were not solved, yet.

Moderators: gto, cipto_kh, EgonHugeist, mdaems

Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 23.02.2007, 12:52

[patch_done] ZVariant

Postby scheurer » 08.02.2010, 15:02

The Type TZVariant in all versions is a real memory waster.
Putting vtBoolean,vtFloat.vtDatetime and vtPointer in a case record
saves memory with any loss in function.

{** Defines a variant structure. }
TZVariant = packed record
VType: TZVariantType;
VString: AnsiString;
VUnicodeString: WideString;
VInterface: IZInterface;
//### 08.02.2010 Scheurer vtBoolean, vtInteger are alternatives
//### and not additive
case TZVariantType of
vtBoolean: (VBoolean: Boolean);
vtInteger: (VInteger: Int64);
vtFloat: (VFloat: Extended);
VtDateTime: (VDateTime: TDateTime);
VtPointer: (VPointer: Pointer);

vtString, vtUnicodestring and vtInterface are not allowed in case records.


User avatar
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium

Postby mdaems » 09.02.2010, 00:45

SVN Rev 790.

Return to “User Patches”

Who is online

Users browsing this forum: No registered users and 1 guest