Developers that extensively use interfaces in Delphi probably know about a long-standing issue with the compiler, where interface parameters declared as const or[ref] will cause a memory leak if a reference-counted object instance isconstructed directly at the call site.Specifically, the following code would create a leak:procedure LeakTest(const Intf: IInterface);beginend;procedure Run;
Weiterlesen...