Destroy class when unloaded

Signed-off-by: Damien Zammit <damien@zamaudio.com>