> Is there a general rule in FLTK for memory allocation errors? Not as such...
> For example, Fl_Group->add must use some form of allocation, > but it returns no error flag. Is there any way to guarantee > that it worked? What happens if it doesn't work? Fl_Group may (under some circumstances) use malloc() and/or realloc() to allocate storage, though often times it manipulates it's child-widgets using the storage it has to hand. If the realloc is needed, and fails, well... > In short, can you trap memory allocation errors in FLTK? Not really. It was built to be fast and light. You want *safe* as well? That said, I've never (so far as I know) encountered a failure due to allocation in the GUI layer. And valgrind says we are generally OK leaks-wise... SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

