C struct garbage collection not run frequently enough

Also, you mention the use of finalizer to free the object. This is not generally a good idea - finalizers are not guaranteed to run immediately, so they may cause your objects to stay alive for much longer than necessary.

If what you’re doing is trying to emulate RAII - there are better ways to do that.