fix bug of delete empty object in instance
use heap instead of stack
pass test(browser) for sign/subscribe/publish