GETFILE_FullFile memory use

4 posts / 0 new
Last post
OldFart
OldFart's picture
Offline
Last seen: 4 months 1 day ago
Joined: 2010-11-30 14:09
GETFILE_FullFile memory use

Hi,

Does this tag use memory that needs to be freed somewhere sometime? Or is this handled internally by the gadget?

OldFart

hypex
hypex's picture
Offline
Last seen: 4 months 1 week ago
Joined: 2011-09-09 16:20
Re: GETFILE_FullFile memory use

Without much info on it I would say it should free the memory itself. Unless you changed the pointer.

But take a look at GFILE_FREELIST. It seems a little complicated but you need to set up a messy looking gfileFreeList first. Before you can use the class. So in the end the onus is on you to free this list.

salass00
salass00's picture
Offline
Last seen: 7 months 2 days ago
Joined: 2011-02-03 11:27
Re: GETFILE_FullFile memory use

@OldFart

No, the returned buffer is internal to the gadget and should not be freed by the application (the same goes for GETFILE_File and GETFILE_Drawer).

salass00
salass00's picture
Offline
Last seen: 7 months 2 days ago
Joined: 2011-02-03 11:27
Re: GETFILE_FullFile memory use

@hypex

You can also just use IDoMethod() (the varargs version of IDoMethodA()) like so:

IIntuition->IDoMethod(getfile, GFILE_FREELIST, filelist);

Log in or register to post comments