mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-06 04:00:08 +00:00
New class: ScopedPointer, which auto-releases a pointer when it goes out of scope. I've used this extensively to replace a lot of pointer deletions with more RAII-style patterns.
This commit is contained in:
parent
4ed1d791e5
commit
c22c06c80c
126 changed files with 1454 additions and 1838 deletions
|
|
@ -38,9 +38,7 @@ juce_ImplementSingleton (ApplicationProperties)
|
|||
|
||||
//==============================================================================
|
||||
ApplicationProperties::ApplicationProperties() throw()
|
||||
: userProps (0),
|
||||
commonProps (0),
|
||||
msBeforeSaving (3000),
|
||||
: msBeforeSaving (3000),
|
||||
options (PropertiesFile::storeAsBinary),
|
||||
commonSettingsAreReadOnly (0)
|
||||
{
|
||||
|
|
@ -153,8 +151,8 @@ bool ApplicationProperties::saveIfNeeded()
|
|||
|
||||
void ApplicationProperties::closeFiles()
|
||||
{
|
||||
deleteAndZero (userProps);
|
||||
deleteAndZero (commonProps);
|
||||
userProps = 0;
|
||||
commonProps = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue