And the auto-clearing of module memory.
I am doubtful that this can be handled within the host alone, as whilst the host can overwrite the memory in many situations. Depending on how/where the memory was allocated, it may be protected by the module runtime, and even then de-allocing it from the host may not 'free' it for use within the module runtime as it may still think it is occupied (unless the module actively forgets it). Be careful with these aspects when testing.
And the auto-clearing of module memory.
I am doubtful that this can be handled within the host alone, as whilst the host can overwrite the memory in many situations. Depending on how/where the memory was allocated, it may be protected by the module runtime, and even then de-allocing it from the host may not 'free' it for use within the module runtime as it may still think it is occupied (unless the module actively forgets it). Be careful with these aspects when testing.