[SOLVED] SetObjName after object release

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] SetObjName after object release

    Hello,
    I like Human readable object identifiers, it helps it many cases to identify objects. But what happens after I delete the object with the name? What should I do with the memory of OS_OBJNAME ?

    For ex.,
    OS_MAILBOX_Create(&Mailbox, 10, 10, &Buffer);

    MailboxName = OS_malloc(sizeof(OS_OBJNAME));
    OS_DEBUG_SetObjName(MailboxName, &Mailbox, "My Mailbox");
    ...
    OS_MAILBOX_Delete(&Mailbox);
    What should I do with the MailboxName ? Is it safe to simply do OS_free(MailboxName)?
  • Dear Vakaras,

    Thank you for your inquiry. Calling free() on MailboxName is not possible at this particular time.
    It may, however, be reassigned for any other object by calling OS_DEBUG_SetObjName() on MailboxName again.

    Please let me know if I can be of any further help.

    Best regards,
    Martin