targets: win32: targetPAL_Events: Fix memory leak (#1950)
targets: win32: targetPAL_Events: Fix memory leak (#1950)

unique_ptr::release call does not destroy the managed object, so we
need to handle this to not generate a leak.

Signed-off-by: Matheus Castello <af02383304f5794299eb6bdbc3796ccbcf621002@castello.eng.br>
nanoframework/nf-interpreter,Eclo/nf-interpreter,nanoframework/nf-interpreter,Eclo/nf-interpreter,nanoframework/nf-interpreter,nanoframework/nf-interpreter,Eclo/nf-interpreter,Eclo/nf-interpreter