Revert "delete afree"

This reverts commit 045862b55d8406d4e6fd9892eb03360776da8277.