Peter N Lewis wrote:
Does New as a function return nil or does it still give a runtime error?
If I want to allocate memory, but handle it gracefully if it fails, what are the recommended approaches?
The modern way is to raise an exception. Unfortunatly, GPC still do not support exceptions (I have started working on this, but my code ATM is non-working).
Lacking exceptions you can just jump out of memory allocator (if you provide your own) or error handler (IIRC GPC allows you to install custom error handler).