Python Forum
quick question about deleting an object from memory
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
quick question about deleting an object from memory
#3
I see. so if I do this:
objects = []
new = (blockClass,'b1')
objects.append(new)
objects.remove(new)
#then assign new to a new instance of a class
new = (blockClass,'b2')
The first object will now no longer have any reference to it so it gets garbage collected, correct?
Reply


Messages In This Thread
RE: quick question about deleting an object from memory - by LavaCreeperKing - Nov-10-2016, 09:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting an error while trying to process data, low memory when memory is not low? bkeith12 0 654 Dec-20-2024, 03:06 PM
Last Post: bkeith12
  Quick question/help regarding my variable Extra 5 2,797 May-06-2022, 12:01 AM
Last Post: Extra
  Quick Question about Dictionaries Extra 6 3,108 Apr-29-2022, 08:34 PM
Last Post: Extra
  Memory Location, Object Attributes and how to use them Meld51 1 2,341 Aug-22-2021, 01:22 PM
Last Post: Yoriz
  finding and deleting json object GrahamL 1 6,073 Dec-10-2020, 04:11 PM
Last Post: bowlofred
  quick question/excel+python zarize 1 2,973 Dec-06-2019, 05:38 PM
Last Post: Larz60+
  opencv memory question djf123 1 5,831 May-26-2019, 11:03 AM
Last Post: heiner55
  A quick question teczone 4 4,164 Sep-06-2018, 03:44 PM
Last Post: snippsat
  Completely new to coding - quick question Oster22 1 3,407 Jun-19-2018, 08:42 PM
Last Post: Larz60+
  Quick help! Ellisrb 2 3,680 May-02-2018, 11:21 AM
Last Post: ThiefOfTime

Forum Jump:

User Panel Messages

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