From: Thomas Thomassen Date: 2013-04-24T19:17:25+09:00 Subject: How do you safely handle ALLOC, ALLOC_N et al? What happens when ALLOC and ALLOC_N fails? Is an Ruby exception raised? I tried tracing the source code, and there seem to be some exceptions being raised, but do they terminate Ruby completely? And how does that work when Ruby is being used embedded within an application? (SketchUp in this instance) Anyone got a best practice example of how to handle ALLOC functions. Do you validate the result etc? And once something is allocated via ALLOC_N, and something later raises an exception - does memory leak? Any way to catch this an ensure the memory is freed? -- Posted via http://www.ruby-forum.com/.