|
From: Chris F. <cd...@fo...> - 2010-06-28 20:45:13
|
On Fri, Jun 25, 2010 at 05:29:24PM -0400, Chris Frey wrote: > On Fri, Jun 25, 2010 at 03:21:06PM -0400, Chris Frey wrote: > > So far, it seems like: > > > > - any _new() function requires an _unref() > > - any _set() function will make a copy, so the caller still owns > > the original data > > - any error requires an _unref() of the error object > > > > After that, any other _get()'able data does not need to be freed, such > > as getting names and strings and even config objects. > > Oops, I found an exception to this. > > osync_plugin_config_get_advancedoptions() returns an osync_list_copy(). > > osync_plugin_config_get_resources() returns the direct list pointer. What do folks think of the idea of renaming each get-style API that returns a copy to include the word "copy"? For example: osync_plugin_config_get_advancedoptions_copy() osync_plugin_config_get_resources() - Chris |