Update grid.base.js

Set res to null. Chrome heap profiler show "res" as unclaimed cause it still see the reference existing at this function.