I
Ike Naar
Guest
Hopefully someone can help me with this.
I'm using the itkDB C interface functions to access a CDBA database.
Some of the "get" functions return a C string (pointer to char), e.g.
extern String dbGetCellViewViewName(dbCellViewId);
dbCellViewId id = /* assume a meaningful value */;
char * viewname = dbGetCellViewViewName(id);
The question is: who owns the memory that is returned by the function
(here, the string ``viewname'') ?
Is it owned by the database? By the caller?
Is it safe to modify the string?
Is it necessary to free the string after having finished with it?
Kind regards,
Ike
I'm using the itkDB C interface functions to access a CDBA database.
Some of the "get" functions return a C string (pointer to char), e.g.
extern String dbGetCellViewViewName(dbCellViewId);
dbCellViewId id = /* assume a meaningful value */;
char * viewname = dbGetCellViewViewName(id);
The question is: who owns the memory that is returned by the function
(here, the string ``viewname'') ?
Is it owned by the database? By the caller?
Is it safe to modify the string?
Is it necessary to free the string after having finished with it?
Kind regards,
Ike