
Notifications
Clear all
Why destructors in python is not much needed as in C++?
0
25/11/2023 4:35 pm
Topic starter
Why destructors in python is not much needed as in C++?
Answer
Add a comment
Add a comment
1 Answer
0
01/12/2023 7:12 am
In Python, destructors are not needed as much as in C++ because Python has a garbage collector that handles memory management automatically. The __del__() method is a known as a destructor method in Python. It is called when all references to the object have been deleted i.e when an object is garbage collected.
Add a comment
Add a comment
Forum Information
- 22 Forums
- 1,969 Topics
- 5,307 Posts
- 0 Online
- 1,282 Members
Our newest member: TimothySenue
Latest Post: Space bug using " & n b s p ; "
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed