Save in juce_PropertiesFile destructor

I’d like a way to make sure that save doesn’t happen in the juce_PropertiesFile destructor. I explicitly save earlier in my program so I can learn whether it succeeds or fails. If it fails, I don’t want to try again in the destructor.

I can think of a couple of ways of doing this:

  • providing a public mutator for needsWriting
  • adding some other member variable with a mutator that the destructor looks at before calling saveIfNeeded.

If you like either one of these, I’ll write a patch for it. Or, do you have another suggestion?

Thanks much.

-DB