Marco van de Voort
marcov at stack.nl
Tue Feb 28 10:38:15 CET 2012
In our previous episode, Martin Schreiber said:
> I read that we should use TBytes instead of AnsiString in order to
> implement combined binary/character buffers with automatic memory
> management. With AnsiString we used setlength() in order to allocate not
> initialized memory.
> TBytes is defined as
> TBytes = array of Byte;
> where setlength() fills the buffer with zeros. What should we use instead?
If you care, you can do manual management. Or pool arrays of byte. (I do
this in my Delphi app, where I have a nice generic pool class).
But I don't think TBookmark is very speed-sensitive.
More information about the fpc-devel