adding mutex lock/unlock macro and fix some memory bug
remove build folder