Global variables need to be used in the project to store a large amount of data. This project will generally not be stopped, so this part will not be recycled. I have been tracking it for a while now, and I feel that this part of the memory is occupied, which greatly affects subsequent operations.
So I'm wondering if there is one that can be released at every point in time.
看情况,关键时刻直接del了。
在你不使用的时候del, 然后在生产,好的办法可以使用redis 存储