1
00:00:00,210 --> 00:00:05,300
Hi, folks, let's start this session and this session is about, according to Dr.

2
00:00:05,580 --> 00:00:07,830
So for that, let's create a class first.

3
00:00:11,510 --> 00:00:17,060
In class, let's clear the public section in public section, let's create a constructor.

4
00:00:20,350 --> 00:00:23,080
In construction, let's put the CEO's statement.

5
00:00:30,480 --> 00:00:32,430
After that, let's create a distracter.

6
00:00:40,350 --> 00:00:45,300
Now we are ready with this glass, we can move forward with creating another glass.

7
00:00:47,520 --> 00:00:48,930
Let's name that derived.

8
00:00:51,120 --> 00:00:53,640
Let's create a constructive and destructive for the same.

9
00:00:57,880 --> 00:01:05,970
Now, since we are ready with this glass and glass, we can inherit this glass in the right class under

10
00:01:05,980 --> 00:01:06,760
public Schoop.

11
00:01:10,750 --> 00:01:11,250
Got it.

12
00:01:11,860 --> 00:01:14,980
Now let's create a point, a variable in brain function.

13
00:01:19,380 --> 00:01:22,830
And do our dynamic memory allocation using new keyword.

14
00:01:27,090 --> 00:01:33,650
Point, which should be noted is we are passing the value of derived glass in this particular point,

15
00:01:33,670 --> 00:01:34,380
the object.

16
00:01:38,410 --> 00:01:43,810
Now, since we have that dynamic memory allocation, we have to release this particular memory dynamically,

17
00:01:43,810 --> 00:01:50,710
too, so we will use the concept of the word and we will run this particular code.

18
00:01:56,030 --> 00:01:59,610
So as shown here, there is a calling to be constructed.

19
00:01:59,810 --> 00:02:05,220
There is a Kalinka derived constructor and it was caused due to the line number 22.

20
00:02:05,420 --> 00:02:10,250
But when we when the flow comes to line number 23, these destructor was called.

21
00:02:10,400 --> 00:02:13,010
But the driver destructor was not called.

22
00:02:13,280 --> 00:02:19,880
And the cause behind this is that that when the flow most of the base construct it was called and there

23
00:02:19,880 --> 00:02:26,990
was a memory leak in there that I constructed because the content of this class was released successfully,

24
00:02:27,140 --> 00:02:30,410
but the content of the class was not successfully released.

25
00:02:30,540 --> 00:02:32,990
And this caused a memory leak in our system.

26
00:02:33,230 --> 00:02:38,960
So to resolve this particular issue as discussed in theory, but we will use the concept of virtual

27
00:02:38,960 --> 00:02:45,000
keyword and had our word in this particular line.

28
00:02:45,650 --> 00:02:48,170
So now if we run this particular code.

29
00:02:53,840 --> 00:03:00,730
Now we can see that base constructor was called derived, constructor was called the diameter destructor

30
00:03:00,750 --> 00:03:03,050
was called and the base of the structure was called.

31
00:03:04,040 --> 00:03:05,870
So now we can confirm that point.

32
00:03:05,870 --> 00:03:11,150
That variable was constructed using base construct that ended up constructed and that required memory.

33
00:03:11,150 --> 00:03:15,230
The location was performed using business stuff that and did I register.

34
00:03:15,870 --> 00:03:18,710
So that said from this glass, thank you for watching.

35
00:03:18,890 --> 00:03:21,920
Please duping us for any cost, please.

36
00:03:21,920 --> 00:03:26,470
Duping us for any kind of doubt, suggestion or any type of equity.

37
00:03:26,870 --> 00:03:27,410
Thank you.
