Memory of a variable or object automatically terminated of finish at the end of program than why we use destructor?
prince26121991
0
Newbie Poster
Recommended Answers
Jump to PostSimply put, because you don't always want to wait until the end of the program to free resources that are no longer needed by the application.
For example, if you were to hold on to the memory allocated every single time the program calls a class object, or every …
All 4 Replies
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
Fbody
682
Posting Maven
Featured Poster
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
Lusiphur
185
Practically a Posting Shark
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.