Fix: a couple of minor reference counting bug;
Change: object allocation and deallocation profiler/logger.