mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 09:19:45 +02:00
* when calling GetInterfaceByStr on COM Objects, the refcounter was not increased
* this bugfix fixes bugreport #0012778 git-svn-id: trunk@15073 -
This commit is contained in:
parent
8cce3d3f91
commit
3f2d66b188
@ -708,6 +708,10 @@
|
||||
continue search }
|
||||
Instance := TObject(obj);
|
||||
until False;
|
||||
{ Getter function will normally AddRef, so adding another reference here
|
||||
will cause memleak. com interfaces only!! }
|
||||
if result and Assigned(IEntry^.IID) and (IEntry^.IType in [etStandard, etFieldValue]) then
|
||||
IInterface(obj)._AddRef;
|
||||
end;
|
||||
|
||||
function TObject.getinterface(const iidstr : shortstring;out obj) : boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user