1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-27 02:20:05 +00:00

Minor code clean-ups.

This commit is contained in:
Julian Storer 2010-08-09 21:47:08 +01:00
parent a9c2f2c69e
commit 23e07daec7
23 changed files with 1736 additions and 1782 deletions

View file

@ -78,8 +78,7 @@ ResizableWindow::~ResizableWindow()
{
resizableCorner = 0;
resizableBorder = 0;
delete static_cast <Component*> (contentComponent);
contentComponent = 0;
contentComponent.deleteAndZero();
// have you been adding your own components directly to this window..? tut tut tut.
// Read the instructions for using a ResizableWindow!
@ -106,8 +105,8 @@ void ResizableWindow::setContentComponent (Component* const newContentComponent,
if (newContentComponent != static_cast <Component*> (contentComponent))
{
if (deleteOldOne)
delete static_cast <Component*> (contentComponent); // (avoid using a scoped pointer for this, so that it survives
// external deletion of the content comp)
contentComponent.deleteAndZero(); // (avoid using a scoped pointer for this, so that it survives
// external deletion of the content comp)
else
removeChildComponent (contentComponent);