[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

    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");
    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,
  • Dear Vakaras,

    I'm glad to announce that the requested functionality will be included with upcoming versions of embOS. That is, V5.06 and later will include a OS_DEBUG_RemoveObjName() function, which may then be used in combination with e.g. OS_free(MailboxName).

    Best regards,