U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » [FEATURE REQUEST] could Alloc fail a little more gracefully?
[FEATURE REQUEST] could Alloc fail a little more gracefully? [message #17623] Sat, 23 August 2008 00:53 Go to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Having being persuaded that new[] is bad and that Buffer::Alloc() is way better, I have hit a snag. When new[] fails it returns a NULL pointer but when Alloc fails it panics and we get an "Out of Memory" message. Is there a way to check if something can be built before we try please?

This is particularly awkward when creating a large Image. Is there a way to know ahead of time that it will fail and is it possible to make bigger ones under a 64bit OS?

Cheers,

Nick
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: StrIntValue -> uses int64
Next Topic: Full Support for timezone/DST [FEATURE REQUEST]
Goto Forum:
  


Current Time: Tue May 05 04:23:20 GMT+2 2026

Total time taken to generate the page: 0.00492 seconds