astCreatedAt

Return the routine, file and line number at which an Object was created

Description:

This function returns pointers to two strings containing the name of the routine or function within which the object was created and the name of the source file containing that routine. It also returns the number of the line within the file at which the object was created. It is intended for use in debugging memory leaks etc.

Precisely, the information returned identifies the point at which the Object s public identifier (i.e. the supplied pointer) was first issued. This may not correspond to the actual creation of the Object if the object is contained within some higher level Object. For instance, if the astGetFrame method is used to get a pointer to a Frame within a FrameSet, the information returned by this function if supplied with the Frame pointer would identify the call to astGetFrame, rather than the line at which the FrameSet created its internal copy of the Frame. Likewise, if this function is used to get information from an Object pointer returned by astClone, the information will describe the call to astClone, not the call that created the original Object.

Synopsis

void astCreatedAt( AstObject this, const char routine, const char file, int line )

Parameters:

this
Pointer to the Object.
routine
Address of a pointer to a null terminated C string in which to return the routine name (the string will reside in static memory). The pointer will be set to NULL on exit if no routine name is available.
file
Address of a pointer to a null terminated C string in which to return the file name (the string will reside in static memory). The pointer will be set to NULL on exit if no file name is available.
line
Address of an int in which to store the line number in the file. A line number of zero is returned if no line number is available.

Notes: