Re: GnomeVFSFileInfo usage



Le mer 30/04/2003 à 07:26, Braden McDaniel a écrit :
> Is it categorically incorrect to attempt to use GnomeVFSFileInfo as an
> automatic variable (rather than using gnome_vfs_file_info_new)?
> 
> I just need to get the MIME type of a file. So I just need to have the
> GnomeVFSFileInfo instance, call gnome_vfs_get_file_info_from_handle, and
> get the MIME type. (At least, that's my impression.) If I can't use the
> automatic variable, is there anything I need to do with the refcounting
> stuff?

The preferred way of using GnomeVFSFileInfo is to allocate it using
gnome_vfs_file_info_new and then unreffing it with
gnome_vfs_file_info_unref. If you reuse the same GnomeVFSFileInfo
several time, you need to use gnome_vfs_file_info_clear to make sure you
don't leak memory.

Christophe

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=



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