Modify AES.cpp to release the dynamically allocated resources.