Do not try to delete a WeakPointer

Change-Id: I34a0374ca75c46309313a9b576af0b748e2324e9
Merge topic 'fix_memory_leak' into master

abda2e52 Do not try to delete a WeakPointer