if i want to dereference an object(using delete operator) of DERIVED class which is being referenced using a BASE class reference, which destructor would b called automatically??
BASE class destructor or DERIVED class destructor??
priyanka.js28 -2 Newbie Poster
Recommended Answers
Jump to PostAre you sure you are talking about Java? Java doesn't have destructors. It has a finalise() method, which is of roughly zero use. If you have finished with an object just ensure there are no remianing references to it. If you have a reference variable that won't go out of …
All 4 Replies
NormR1 563 Posting Sage Team Colleague
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
tong1 22 Posting Whiz
JamesCherrill 4,733 Most Valuable Poster 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.