<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>On 16 dec '11, Michael Van Canneyt wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<pre>
On Fri, 16 Dec 2011, <a href="mailto:dhkblaszyk@zeelandnet.nl">dhkblaszyk@zeelandnet.nl</a>wrote:</pre>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">On implementing a linked list I hit to some unexpected (doesn't mean incorrect though) behaviour. ptest = ^test; test = record p: pointer; end; new(mytest); When I allocate "mytest" the pointer variable "p" is initialized as $ffffffff instead of nil as I did suspect. In my code though I am relying on the fact that new pointers are indeed nil so I can allocate them accordingly. How can I force and rely on the fact that p is always nil? What is the correct procedure here?</blockquote>
<pre>Newly allocated memory is never zeroed out. You must do this manually with FillChar or FillWord.
This is only done automatically for class instances.
I will add a note to the docs.
Michael.
</pre>
</blockquote>
<p>I wasn't sure about this, but now I know.</p>
<p> </p>
<p>Thanks Michael.</p>
<p> </p>
<div> </div>
</body></html>