<div dir="ltr">2016-02-20 3:24 GMT-02:00 Michalis Kamburelis <span dir="ltr"><<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@gmail.com</a>></span>:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The major problem there is that it's difficult to force it to be<br>
always initialized with zeroes. Currently, a non-global variable of<br>
unmanaged type can always be filled with memory garbage, as explained<br>
in other thread. The trick in<br>
<a href="http://blogs.embarcadero.com/abauer/2008/09/18/38869" rel="noreferrer" target="_blank">http://blogs.embarcadero.com/abauer/2008/09/18/38869</a> to use interfaces<br>
feels ugly, it's an over-use of the "interface" specifics in Object<br>
Pascal.<br>
<br></blockquote><div><br></div><div>A less "ugly" code could be to store the pointer value in an array of bytes (TBytes). As the TBytes type is a managed type, it will always be initialized.<br></div></div></div></div>