# Is it possable to have tabed Components with in Tab Componen

**URL:** <https://forum.juce.com/t/is-it-possable-to-have-tabed-components-with-in-tab-componen/445>\
**Category:** General JUCE discussion\
**Created:** [October 14, 2005, 4:51pm UTC](https://forum.juce.com/t/is-it-possable-to-have-tabed-components-with-in-tab-componen/445 "2005-10-14T16:51:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nugtoka](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@Nugtoka](https://forum.juce.com/u/Nugtoka)\
**Post date:** [October 14, 2005, 4:51pm UTC](https://forum.juce.com/t/is-it-possable-to-have-tabed-components-with-in-tab-componen/445/1 "2005-10-14T16:51:56Z")

</div>

I’ve got it build but i’m getting horrable memory leaks

---

<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:** [October 16, 2005, 10:03am UTC](https://forum.juce.com/t/is-it-possable-to-have-tabed-components-with-in-tab-componen/445/2 "2005-10-16T10:03:07Z")

</div>

really? What’s leaking?

Remember that when you implement createPanelComponentForTab() you tell it whether to delete the component later on. If you tell it not to, then when the tabbed component is deleted, it won’t clear up its current panel component.

---

<div class="post-metadata">

**Author:** ![Nugtoka](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@Nugtoka](https://forum.juce.com/u/Nugtoka)\
**Post date:** [October 17, 2005, 2:59pm UTC](https://forum.juce.com/t/is-it-possable-to-have-tabed-components-with-in-tab-componen/445/3 "2005-10-17T14:59:14Z")

</div>

yes i used the componentCanBeDeleted = true; first thing in that method.  
i also took some ques from your demo program where you created a component that deletesAllChildren() but i’m getting the leaks when i try to use a tabbedComponent as a panel with in another tabbedCompoent is there any particular way i need to set this up?

thanks

---

<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:** [October 17, 2005, 3:25pm UTC](https://forum.juce.com/t/is-it-possable-to-have-tabed-components-with-in-tab-componen/445/4 "2005-10-17T15:25:09Z")

</div>

Putting one inside another is no different to using any other component - there’s nothing special going on.

You must just be not deleting a child component somewhere. If you’re on windows and you’ve added the juce\_useDebugNew macro to your classes then it should be easy to see which comps are being leaked.

---

<div class="post-metadata">

**Author:** ![Nugtoka](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@Nugtoka](https://forum.juce.com/u/Nugtoka)\
**Post date:** [October 17, 2005, 4:10pm UTC](https://forum.juce.com/t/is-it-possable-to-have-tabed-components-with-in-tab-componen/445/5 "2005-10-17T16:10:37Z")

</div>

I’ve been doing some tests. It looks like the memory leak “at least one of them” is started with a lookAndFeel class I’m using to size the tabs by overriding the getTabButtonBestWidth() Method. My goal is to have the tabs spread themselves across the width of the app automatically. but for the time being I’ve just been returning a static int to experiment with the tab sizes.

juce\_useDebugNew?? havn’t seen that one before how is it used?

---

<div class="post-metadata">

**Author:** ![jtxx000](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jtxx000](https://forum.juce.com/u/jtxx000)\
**Post date:** [October 17, 2005, 10:16pm UTC](https://forum.juce.com/t/is-it-possable-to-have-tabed-components-with-in-tab-componen/445/6 "2005-10-17T22:16:04Z")

</div>

Try using haydxn’s memory counter debugger thingy from [this](http://www.adbe.org/juceforum/viewtopic.php?t=366) thread.

---

<div class="post-metadata">

**Author:** ![Nugtoka](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@Nugtoka](https://forum.juce.com/u/Nugtoka)\
**Post date:** [October 18, 2005, 5:24pm UTC](https://forum.juce.com/t/is-it-possable-to-have-tabed-components-with-in-tab-componen/445/7 "2005-10-18T17:24:44Z")

</div>

Ok after doing some research and basically starting from scratch I’ve found that the cause of the memory leaks is the LookandFeel class. If i try to inherit the LookandFeel class and use it with any thing with in a Tab i get a memory leak!! has somthing changed in the LookandFeel class since juce version 1.15???

---

<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:** [October 19, 2005, 8:48am UTC](https://forum.juce.com/t/is-it-possable-to-have-tabed-components-with-in-tab-componen/445/8 "2005-10-19T08:48:23Z")

</div>

Do you mean that the LF object itself is getting leaked? If so, that’s true, because they’re not deleted automatically by anything. If you create one temporarily for a component, you’ll need to make sure you also delete it when it’s no longer needed.

---

<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:** [May 12, 2017, 9:53am UTC](https://forum.juce.com/t/is-it-possable-to-have-tabed-components-with-in-tab-componen/445/9 "2017-05-12T09:53:17Z")

</div>

Closed on May 12, 2017, 9:53am UTC


