Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Memory use of a script
#2
Short answer: you shouldn't worry about it unless you're actively having issues. If you are actively having issues, I strongly recommend you refactor your code to use object oriented programming where a cache can be managed explicitly rather than what I'm about to say to answer your question.

In your code you have import slave. Once you're done with it, you can do del slave and then Python, when it feels like it, can free the memory associated. You can look into the garbage collection module if that's still not enough.
Reply


Messages In This Thread
Memory use of a script - by ebolisa - Nov-02-2018, 01:23 PM
RE: Memory use of a script - by micseydel - Nov-02-2018, 03:51 PM
RE: Memory use of a script - by ebolisa - Nov-02-2018, 04:00 PM
RE: Memory use of a script - by micseydel - Nov-02-2018, 06:36 PM
RE: Memory use of a script - by ebolisa - Nov-02-2018, 06:46 PM
RE: Memory use of a script - by micseydel - Nov-02-2018, 07:01 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020