new /app/release api, fix memory leak and other bugs