better resource allocation handling using EventEmitter
stop heartbeat on release