Hi, folks, let's start this session and this session is about, according to Dr.
So for that, let's create a class first.
In class, let's clear the public section in public section, let's create a constructor.
In construction, let's put the CEO's statement.
After that, let's create a distracter.
Now we are ready with this glass, we can move forward with creating another glass.
Let's name that derived.
Let's create a constructive and destructive for the same.
Now, since we are ready with this glass and glass, we can inherit this glass in the right class under
public Schoop.
Got it.
Now let's create a point, a variable in brain function.
And do our dynamic memory allocation using new keyword.
Point, which should be noted is we are passing the value of derived glass in this particular point,
the object.
Now, since we have that dynamic memory allocation, we have to release this particular memory dynamically,
too, so we will use the concept of the word and we will run this particular code.
So as shown here, there is a calling to be constructed.
There is a Kalinka derived constructor and it was caused due to the line number 22.
But when we when the flow comes to line number 23, these destructor was called.
But the driver destructor was not called.
And the cause behind this is that that when the flow most of the base construct it was called and there
was a memory leak in there that I constructed because the content of this class was released successfully,
but the content of the class was not successfully released.
And this caused a memory leak in our system.
So to resolve this particular issue as discussed in theory, but we will use the concept of virtual
keyword and had our word in this particular line.
So now if we run this particular code.
Now we can see that base constructor was called derived, constructor was called the diameter destructor
was called and the base of the structure was called.
So now we can confirm that point.
That variable was constructed using base construct that ended up constructed and that required memory.
The location was performed using business stuff that and did I register.
So that said from this glass, thank you for watching.
Please duping us for any cost, please.
Duping us for any kind of doubt, suggestion or any type of equity.
Thank you.