mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added an advisory note about deleteAllChildren()
This commit is contained in:
parent
d31d02b4e8
commit
04cb9bf3e8
1 changed files with 7 additions and 1 deletions
|
|
@ -775,7 +775,13 @@ public:
|
|||
*/
|
||||
void removeAllChildren();
|
||||
|
||||
/** Removes all this component's children, and deletes them.
|
||||
/** Removes and deletes all of this component's children.
|
||||
My advice is to avoid this method! It's an old function that is only kept here for
|
||||
backwards-compatibility with legacy code, and should be viewed with extreme
|
||||
suspicion by anyone attempting to write modern C++. In almost all cases, it's much
|
||||
smarter to manage the lifetimes of your child components via modern RAII techniques
|
||||
such as simply making them member variables, or using ScopedPointer, OwnedArray, etc
|
||||
to manage their lifetimes appropriately.
|
||||
@see removeAllChildren
|
||||
*/
|
||||
void deleteAllChildren();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue