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