Added method to check allocated memory by demand
Initial Error reporting for leak check
Initial support for LeakCkeck flush