- class brainpy.math.clear_buffer_memory(platform=None, array=True, compilation=False)#
Clear all on-device buffers.
This function will be very useful when you call models in a Python loop, because it can clear all cached arrays, and clear device memory.
This operation may cause errors when you use a deleted buffer. Therefore, regenerate data always.