<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>While dabbling with pointers, I came across a memleak for which I don't understand why it happens. Hopefully someone can help me with it.</p>
<p> </p>
<p>mytest^.name := Format('%s.%.3d', ['name', 1]);</p>
<p> </p>
<p>This assigns 'name.001' to the pointer variable but causes a memleak. If I assign the same value as string constant no memleak occurs, so it must be something related to format.</p>
<p> </p>
<p>Regards, Darius</p>
<div> </div>
</body></html>