Fix file array memory cleaning
Fix file array memory cleaning

Fixed issue where the memory counter wasn't getting reset when
all of the files were closed.

alberthdev/nclayer,alberthdev/nclayer,alberthdev/nclayer