Virtual Destructor In C++

  Рет қаралды 15,218

CppNuts

CppNuts

3 жыл бұрын

JOIN ME
-----
KZfaq 🎬 / @cppnuts
Patreon 🚀 / cppnuts
COMPLETE PLAYLIST
------------
C++ Tutorial For Beginners: • Introduction To C++
STL (Standard Template Library): • STL In C++
ThreadIng In C++: • Multithreading In C++
Data Structures: • Data Structure
Algorithms: • Binary Search
Design Patterns: • Factory Design Pattern...
Smart Pointers: • Smart Pointer In C++
C++14: • Digit Separator In C++
C++17: • std string_view in C++...
C++ All Type Casts: • static_cast In C++
INTERVIEW PLAYLIST
------------
C++ Interview Q&A: • Structural Padding & P...
C++ Interview Q&A For Experienced: • How delete[] Knows How...
Linked List Interview Questions: • Find Kth Node From Bac...
BST Interview Questions: • Search Element In Bina...
Array Interview Questions: • Reverse An Array
String Interview Questions: • Check String Is Palind...
Bit Manipulation Questions: • Find Set Bit In Intege...
Binary Tree Interview Question: • Invert Binary Tree
Sorting Algorithms: • Bubble Sort
C++ MCQ: • Video
C MCQ: • What printf returns af...
C Interview Questions: • Designated Initializat...
QUICK SHORT VIDEOS
-------------
C++ Short : • C++ Short Videos
C Short : • Shorts C Programming MCQ
In thiis video we will learn about virtual destructor in C++.
NOTES:
1. If we delete child class object through a pointer of parent class then it is undefined behaviour,
if parent class doesn't have virtual destructor.
2. If we fail to declare destructor as virtual in parent class then we endup having memory leak.
#cpp #virtualfunction #programming #interviewquestions #softwareengineering #computerscience

Пікірлер: 50
@jonnywright8155
@jonnywright8155 3 жыл бұрын
Hey man! Glad 2 see you making videos again. All the best bro! - Jon
@CppNuts
@CppNuts 3 жыл бұрын
Thanks man..
@byroxkdk7056
@byroxkdk7056 3 жыл бұрын
your videos are a blessing man, keep it coming. And if possible make a video on "file handling". Cheers mate.
@CppNuts
@CppNuts 3 жыл бұрын
Thanks dude..
@ShailJava
@ShailJava 2 жыл бұрын
Thanks for posing such videos. Really helpful. Please make more if possible on different topics.
@fardeen2158
@fardeen2158 3 жыл бұрын
Thankyou so much can u please cover these topics 1.Pointers 2.Link list 3. Stack & Queue 4.Graph.5.Tre please
@mockingbird3809
@mockingbird3809 3 жыл бұрын
Hi, Can you please cover std::istream, std::ostream, std::stringstream(ostringstream, istringstream), and std::istream_iterator topics which are related to streams? That would be great :)
@behindthescene4406
@behindthescene4406 3 жыл бұрын
I am beginer doing a lot of mistakes many times code doesn't even compile but still o don't give up...sometimes Google also betrayed for finding results , but still going 😎 thanks man your such amazing videos 😀
@CppNuts
@CppNuts 3 жыл бұрын
Thanks for sharing
@wasimakram5371
@wasimakram5371 3 жыл бұрын
You are always amazing ❤️
@CppNuts
@CppNuts 3 жыл бұрын
Thanks..
@marativamshikumar3489
@marativamshikumar3489 3 жыл бұрын
Hi Rupesh, one ☝️ kind request. Please make a video on vtable, vpointer and virtual internals.
@CppNuts
@CppNuts 3 жыл бұрын
Sure dude..
@kanishkjain2767
@kanishkjain2767 6 ай бұрын
You still haven't posted the video for vptr and vtable Please post that I am having trouble understanding those concepts from another videos
@sivaramakrishnachitithoti1428
@sivaramakrishnachitithoti1428 3 жыл бұрын
Thanks
@CppNuts
@CppNuts 3 жыл бұрын
Welcome
@arunchoudhary7493
@arunchoudhary7493 2 жыл бұрын
You have cleared the concept thansks :), in the end of the video you mentioned about the virtual pointer and virtual table, Where is that video, you posted that video?
@CppNuts
@CppNuts 2 жыл бұрын
Not yet.
@arunchoudhary7493
@arunchoudhary7493 2 жыл бұрын
@@CppNuts is there a plan to create that video, if yes, when can i expect that. Thanks in advance.
@prabhakaranraja8346
@prabhakaranraja8346 2 жыл бұрын
@@CppNuts Is there any plan to release the virtual pointer and virtual table video ?
@CppNuts
@CppNuts 2 жыл бұрын
@@prabhakaranraja8346 Yes in few days..
@vedikvichar2813
@vedikvichar2813 2 жыл бұрын
Hi Rupesh, I want to prepare for interviews as an experienced on c++ and vc++ as well. Could you please help me on that.
@prishaphotography9063
@prishaphotography9063 3 жыл бұрын
Nice video
@CppNuts
@CppNuts 3 жыл бұрын
Thanks
@vasudevemmennavar6946
@vasudevemmennavar6946 3 жыл бұрын
thanks for this amazing video bro. Please make a video for vtable and vptrs.....
@CppNuts
@CppNuts 3 жыл бұрын
Ok coming soon
@ramakrishnam5455
@ramakrishnam5455 3 жыл бұрын
@@CppNuts please post vtable and vptr video
@CppNuts
@CppNuts 3 жыл бұрын
Sure, in few days i will start posting.
@mainaibatauga1515
@mainaibatauga1515 3 жыл бұрын
Code blocks use karte ho kya aap?
@CppNuts
@CppNuts 3 жыл бұрын
VS code is the editor.
@181Ravikiran
@181Ravikiran 3 жыл бұрын
Bro, please make more videos, Thanks
@CppNuts
@CppNuts 3 жыл бұрын
Working on it!
@mayurpatil6991
@mayurpatil6991 2 жыл бұрын
where is that video of virtual pointer and virtual table in c++, i can not found ?
@raghuj7097
@raghuj7097 3 жыл бұрын
Sir, pls share internals of virtual functions, vtables , vptrs
@CppNuts
@CppNuts 3 жыл бұрын
Sure..
@dhirajbennadi7850
@dhirajbennadi7850 3 жыл бұрын
Is it safe to make the destructor of the base class as virtual? If there is a statement delete this in the destructor of the base class would it not cause an issue??
@KNT_19
@KNT_19 3 жыл бұрын
Is virtual destructor also added to the vtable like other normal virtual functions?
@CppNuts
@CppNuts 3 жыл бұрын
No it's not.
@udayachandran8541
@udayachandran8541 2 жыл бұрын
where is the link for vptr and vtable?
@madhuriagawane3071
@madhuriagawane3071 3 жыл бұрын
next video of vptr and vtable?
@CppNuts
@CppNuts 3 жыл бұрын
It's ready, need time to record it. May be in 2 to 3 days.
@udayachandran5036
@udayachandran5036 3 жыл бұрын
@@CppNuts Can u please ping me the link here?
@akashmore5238
@akashmore5238 Жыл бұрын
where is the video link for VTable and VPointer???
@CppNuts
@CppNuts Жыл бұрын
I switched from windows to mac and those commands stopped working in mac, somehow i need to record this video on windows machine, which is kind of problematic because i don’t have windows machine.
@gauravgoel8519
@gauravgoel8519 Жыл бұрын
in my pc compiler is giving size of d 4 instead of 8 can you tell reason #include using namespace std; class Base { public: Base() { cout
@CppNuts
@CppNuts Жыл бұрын
Your computer is using 32 bit processor ?
@user-tz9kn1nu3u
@user-tz9kn1nu3u 3 жыл бұрын
why don't you just make a makefile which could compile and run code for you? That could save you unnecessary typing.
@CppNuts
@CppNuts 3 жыл бұрын
Thanks man..
@harshitrathi3077
@harshitrathi3077 3 жыл бұрын
bro are u from india , can i have u r instagram handle?
@CppNuts
@CppNuts 3 жыл бұрын
I don't use instagram :)
Pure Virtual Function In C++
16:15
CppNuts
Рет қаралды 13 М.
Virtual Function In C++
15:08
CppNuts
Рет қаралды 34 М.
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 39 МЛН
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 5 МЛН
How I use C++: a line-by-line code review
1:40:40
strager
Рет қаралды 244 М.
Unique Pointer In C++
13:55
CppNuts
Рет қаралды 44 М.
Object-Oriented Programming is Embarrassing: 4 Short Examples
28:03
Virtual Destructors in C++
7:55
The Cherno
Рет қаралды 104 М.
Const Data Member In C++
15:03
CppNuts
Рет қаралды 22 М.
Weak Pointer In C++
16:47
CppNuts
Рет қаралды 25 М.
reinterpret_cast In C++
14:33
CppNuts
Рет қаралды 42 М.
Static Data Member And Static Member Function In C++
17:19
CppNuts
Рет қаралды 51 М.
Pure Virtual Destructors | C++ Tutorial
18:12
Portfolio Courses
Рет қаралды 3,1 М.
Delivering Safe C++ - Bjarne Stroustrup - CppCon 2023
1:29:16