Free image memory

Unfortunately, on Windows neither method of freeing image memory works (for me). On Linux assigning a new image doesn’t work, and “nullptr is not declared in this scope”. I gather it may be possible to jump through some hoops to make nullptr declared, but since it doesn’t have effect on Windows it doesn’t seem worth the effort.

Any other suggestions?