BXE: slightly better memory management