IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 18 years ago

Closed 18 years ago

#1095 closed enhancement (fixed)

pmFPAfileDefine functions need to be explicit if the are allocators or not

Reported by: eugene Owned by: Paul Price
Priority: high Milestone:
Component: camera Version: unspecified
Severity: minor Keywords:
Cc:

Description

the functions like pmFPAfileDefineOutput and pmFPAfileDefineFromArgs, etc are not very clear if they are allocators or not, and are inconsistent when they error on freeing the items they return on success. I believe these functions all result in a new entry on the config->files metadata, and they all return views on that structure. They are thus NOT allocators, and programs which call them should not attempt to free the returned points. This should be made explicit in the comments for the funcions, and the usage fixed.

Change History (1)

comment:1 by Paul Price, 18 years ago

Resolution: fixed
Status: newclosed

Fixed in CVS head.

Added additional notes in pmFPAfileDefine.h that the returned pmFPAfile is a view only (the caller should not free it). I think every function now has this note.

Cleaned up erroneous frees of the pmFPAfile in pmFPAfileDefine.c (since the pointer was a view).

Note: See TracTickets for help on using tickets.