FUNCTION SystemspartsClT.KeyFound(Key : AluCostDict.SystemspartskeyT) : BOOLEAN;
VAR v : Variant;
BEGIN
v := VarArrayCreate([0,1], VarInteger);
v[0] := Key.System;
v[1] := Key.PartType;
Sucess := t.Locate('System;PartType', v, []);
v := NULL;
Result := Sucess;
END;
I am using Delphi for Win32.
Does this function create a memory leak or not ?
Should I free the variant v as vararray and how?
Should I free or initialize the local variant v?