X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=man%2Fmitem_new.3x;fp=man%2Fmitem_new.3x;h=c08d05ed6119e352cabfe38525ec23eaaae2b363;hp=e61febfa9c67efaa8bb07491ed770802d729e363;hb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1;hpb=3a9b6a3bf0269231bef7de74757a910dedd04e0c diff --git a/man/mitem_new.3x b/man/mitem_new.3x index e61febfa..c08d05ed 100644 --- a/man/mitem_new.3x +++ b/man/mitem_new.3x @@ -11,9 +11,14 @@ int free_item(ITEM *item); .br .SH DESCRIPTION The function \fBnew_item\fR allocates a new item and initializes it from the -\fBname\fR and \fBdescription\fR pointers. +\fBname\fR and \fBdescription\fR pointers. Please notice that the item stores +only the pointers to the name and description. Those pointers must be valid +during the lifetime of the item. So you should be very carefull with names +or descriptions allocated on the stack of some routines. .br -The function \fBfree_item\fR de-allocates an item. +The function \fBfree_item\fR de-allocates an item. Please notice that it +is the responsibility of the application to release the memory for the +name or the description of the item. .SH RETURN VALUE The function \fBnew_item\fR returns \fBNULL\fR on error.