Despite bummi's fine explanation of why Image1.Picture := nil
won't cause a memory leak, I'm concerned that it may raise red-flags in the minds of new people reading my code, since its safety is counter-intuitive. Therefore, I'd like to avoid it. What more-intuitive alternatives exist? Although bummi's answer was for Delphi, I'm actually more interested in C++Builder.
Encapsulating the property assignment provides two advantages:
e.g.:
// Not a memory leak: see http://stackoverflow.com/a/23999207/782738
#define ClearImage(Image) Image->Picture = NULL