Question: Are there any specific guidelines of what to do if you get a memory warning? I know that you have to try and kill off objects that aren't required, but if this makes your application inoperable, what other options are there?

An example might be if say the application was Apple's contacts app and the user is editing a person's contact details. What could you do? Stop the edit? close down and jump to the list screen?

Any advice or guidelines would be most appreciated.

Answer: 
ybungalobill has already answered the question about where.

Regarding references, for a reference to `const` *T* you can just specify a default value directly.

For a reference to non-`const` you need to specify the default "value" as a reference to non-`const`. This might be a global, or an instance of a class with suitable conversion. E.g.,

```
#include <iostream>

struct DummyInt
{
    int dummy;
    operator int& () { return dummy; }
    DummyInt(): dummy( 0 ) {}
};

void foo( int& v = DummyInt() ) {}  // Whatever

int main()
{
    int x   = 42;
    foo( x );
    foo();
}

```

Cheers & hth.,

– Alf
I used to make use of default values, but meanwhile I changed my mind: I find the code better readable when I write the parameter values explictly. Sometimes I define another method like the following: 

```
bool Initialize( const char * pszPath );
bool InitializeDefault();

```

instead of 

```
bool Initialize( const char * pszOptPath = NULL );

```