# Assertion in MessageManager

**URL:** <https://forum.juce.com/t/assertion-in-messagemanager/5508>\
**Category:** General JUCE discussion\
**Created:** [July 25, 2010, 12:06pm UTC](https://forum.juce.com/t/assertion-in-messagemanager/5508 "2010-07-25T12:06:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterv](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/peterv/32/151_2.png) [@peterv](https://forum.juce.com/u/peterv)\
**Post date:** [July 25, 2010, 12:06pm UTC](https://forum.juce.com/t/assertion-in-messagemanager/5508/1 "2010-07-25T12:06:36Z")

</div>

I have updated to the latest juce revision and now I get an assertion in MessageManager when I quit the my application. With an older juce revision I did not get this assertion. I cant find the problem. I have one Component and I am deleting all child components in the destructor, but I get this assertion. I dont know what I am doing wrong. I also have some Listeners. Should I delete them seperately or do I forget to delete something else? Did something changed in Juce and I have to delete some Object which I did not have to do with older Juce revisions?

Peter

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 25, 2010, 12:14pm UTC](https://forum.juce.com/t/assertion-in-messagemanager/5508/2 "2010-07-25T12:14:17Z")

</div>

…which assertion is it?

---

<div class="post-metadata">

**Author:** ![peterv](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/peterv/32/151_2.png) [@peterv](https://forum.juce.com/u/peterv)\
**Post date:** [July 25, 2010, 12:22pm UTC](https://forum.juce.com/t/assertion-in-messagemanager/5508/3 "2010-07-25T12:22:06Z")

</div>

The assertion is in juce\_MessageManager.cpp line 65

```auto

```

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 25, 2010, 12:34pm UTC](https://forum.juce.com/t/assertion-in-messagemanager/5508/4 "2010-07-25T12:34:59Z")

</div>

Sounds like you’re leaking a component. I added the assertion recently to help catch mistakes like that, but it’s up to you to track down the source of your leak - it won’t be caused by anything that I’ve changed, you were probably always leaking without noticing it.

---

<div class="post-metadata">

**Author:** ![masshacker](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/masshacker/32/650_2.png) [@masshacker](https://forum.juce.com/u/masshacker)\
**Post date:** [July 25, 2010, 12:47pm UTC](https://forum.juce.com/t/assertion-in-messagemanager/5508/5 "2010-07-25T12:47:14Z")

</div>

On windows, when this happens, usually you can see something like:  
“Detected memory leaks!”  
“Dumping objects-\>”

in the output console.  
The list of strings after “Dumping objects” can help to find the leak.

---

<div class="post-metadata">

**Author:** ![dave96](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dave96/32/8487_2.png) [@dave96](https://forum.juce.com/u/dave96)\
**Post date:** [July 25, 2010, 1:14pm UTC](https://forum.juce.com/t/assertion-in-messagemanager/5508/6 "2010-07-25T13:14:22Z")

</div>

I had this problem recently and tracked it down to a threading issue. I had a value tree object that was being read from both the message thread and the audio thread. I solved the problem by using an intermediate set of variables and used a critical section when writing to them. May be relied to your problem. I would also make sure you are removing your listeners in the detractor before you delete the component to be on the safe side.

---

<div class="post-metadata">

**Author:** ![peterv](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/peterv/32/151_2.png) [@peterv](https://forum.juce.com/u/peterv)\
**Post date:** [July 26, 2010, 7:58am UTC](https://forum.juce.com/t/assertion-in-messagemanager/5508/7 "2010-07-26T07:58:05Z")

</div>

Thank you guys for your quick answers. I found the problem. I was using PropertiesFile not correctly and that was the Object I did not release.  
Thanks again for your efforts.

Peter
