Plug some memory leaks, and correct code for unregistering eventtargets.
Plug some memory leaks, and correct code for unregistering eventtargets.

Alexpux/Coin3D,Alexpux/Coin3D,Alexpux/Coin3D,Alexpux/Coin3D