search

Home  >  Q&A  >  body text

Python global variable release?

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.

大家讲道理大家讲道理2750 days ago673

reply all(2)I'll reply

  • 習慣沉默

    習慣沉默2017-05-24 11:37:10

    Depending on the situation, it will be deleted directly at the critical moment.

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-24 11:37:10

    Del when you are not using it, and then in production, a good way is to use redis storage

    reply
    0
  • Cancelreply