# vSemaphoreCreateBinary

**URL:** <https://forums.freertos.org/t/vsemaphorecreatebinary/3688>\
**Category:** Kernel\
**Created:** [March 16, 2009, 8:11am UTC](https://forums.freertos.org/t/vsemaphorecreatebinary/3688 "2009-03-16T08:11:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 16, 2009, 8:11am UTC](https://forums.freertos.org/t/vsemaphorecreatebinary/3688/1 "2009-03-16T08:11:25Z")

</div>

**[aviasaf](https://sourceforge.net/u/aviasaf/)** wrote on [Monday, March 16, 2009](https://sourceforge.net/p/freertos/discussion/382005/thread/a113b6fa/#65ba):

hello all,

i am a new user of free Rtos

i am using vSemaphoreCreateBinary macro in order to create binary semaphore ,

as i understand, the semaphore is being created by using the heap.

my question is : how can i delete this handler when i stop using it.

i didnt found any macro or function that frees this allocation.

so what can I do, I have memory leak problem.

avi

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 16, 2009, 11:42am UTC](https://forums.freertos.org/t/vsemaphorecreatebinary/3688/2 "2009-03-16T11:42:07Z")

</div>

**[davedoors](https://sourceforge.net/u/davedoors/)** wrote on [Monday, March 16, 2009](https://sourceforge.net/p/freertos/discussion/382005/thread/a113b6fa/#65ba/8ec5):

You can actually use the vQueueDelete() function to delete semaphores too as underneath they are the same structures.
