TMS FNC GRID Memory Leak

The video doesn't show a memory leak but an access violation. If this is related to this thread: Access violation with TMSFNCGridGetCellLayout - #4 by Pieter_Scheldeman please fix the code in your project to avoid the access violation.