Neil Santos wrote:
1) Is this correct behavior according to the standards? I know that doing two New()'s on the same pointer is a recipe for disaster,
No, it isn't. Don't know where you got this from.
`Turbo Pascal 6: The Complete Reference', by Stephen O'Brien, published by Borland and Osborne. Said two New()'s on the same pointer will allocate two chunks of memory of sizeof(variable) on the heap, and two corresponding Dispose()'s will not get rid of the two allocations.
Yes, the two `Dispose's on the same value are a disaster if you will, two `New's are just a memory leak, often harmless. Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707