Use SafeRelease and SafeDelete to make sure released objects are NULL and will cause proper errors if referenced again.

TRAC #23617

Signed-off-by: Nicolas Capens
Signed-off-by: Shannon Woods
Author: Geoff Lang
31 files changed