Re: [Nautilus-list] [PATCH] creating launchers with Nautilus



On 3/5/02 12:59 PM, "Gaute Lindkvist" <lindkvis stud ntnu no> wrote:

>>> +    launcher_dialog (path, fm_directory_view_get_containing_window
>> (FM_DIRECTORY_VIEW (callback_data)), NULL);
>> 
>> It's generally considered bad style to pass in a string that's "adopted" by
>> the function you're calling. If the path is not "adopted", then you have a
>> storage leak here, and need a g_free.
> 
> I fixed the two others. This one, I'm not really sure of, since I'm mostly
> a Java-programmer. What is the correct way of solving this?

Adding a call to g_free (path) to get rid of the path after using it. But
also you need to put those other files where I can see them, because this
depends on how your "launcher_dialog" function works.

    -- Darin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]