----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviewboard.asterisk.org/r/3089/#review10515 -----------------------------------------------------------
So...I just don't really like this. 1) Making a macro like this makes the code more esoteric than it previously was. 2) The fact that the loop_obj has to be NULLed out before breaking or returning from the loop if no reference manipulation is required makes it more likely for us to miss referencing errors during review. Plus, those referencing errors would likely be more catastrophic than the previously-missing ao2_iterator_destroy() calls. - Mark Michelson On Dec. 20, 2013, 10:47 p.m., rmudgett wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviewboard.asterisk.org/r/3089/ > ----------------------------------------------------------- > > (Updated Dec. 20, 2013, 10:47 p.m.) > > > Review request for Asterisk Developers. > > > Repository: Asterisk > > > Description > ------- > > Due to repeated errors in people remembering to call ao2_iterator_destroy() I > have created the AO2_ITERATOR_SAFE_LOOP_START() / AO2_ITERATOR_SAFE_LOOP_END > macros. Usage examples are documented where these macros are declared. > > > Diffs > ----- > > /branches/12/tests/test_stasis.c 404437 > /branches/12/include/asterisk/astobj2.h 404437 > > Diff: https://reviewboard.asterisk.org/r/3089/diff/ > > > Testing > ------- > > No memory leaks from running "test execute category /stasis/core/ name > cache_dump". > > > Thanks, > > rmudgett > >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev