Virtual Destructor In C++
Vložit
- čas přidán 19. 11. 2020
- JOIN ME
-----
CZcams 🎬 / @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
Hey man! Glad 2 see you making videos again. All the best bro! - Jon
Thanks man..
your videos are a blessing man, keep it coming.
And if possible make a video on "file handling".
Cheers mate.
Thanks dude..
Thanks for posing such videos. Really helpful. Please make more if possible on different topics.
Thankyou so much can u please cover these topics 1.Pointers 2.Link list 3. Stack & Queue 4.Graph.5.Tre please
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 :)
Hi Rupesh,
I want to prepare for interviews as an experienced on c++ and vc++ as well. Could you please help me on that.
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 😀
Thanks for sharing
You are always amazing ❤️
Thanks..
where is that video of virtual pointer and virtual table in c++, i can not found ?
Hi Rupesh, one ☝️ kind request. Please make a video on vtable, vpointer and virtual internals.
Sure dude..
You still haven't posted the video for vptr and vtable
Please post that
I am having trouble understanding those concepts from another videos
Nice video
Thanks
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??
Thanks
Welcome
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?
Not yet.
@@CppNuts is there a plan to create that video, if yes, when can i expect that.
Thanks in advance.
@@CppNuts Is there any plan to release the virtual pointer and virtual table video ?
@@prabhakaranraja8346 Yes in few days..
Is virtual destructor also added to the vtable like other normal virtual functions?
No it's not.
where is the link for vptr and vtable?
Sir, pls share internals of virtual functions, vtables , vptrs
Sure..
Code blocks use karte ho kya aap?
VS code is the editor.
thanks for this amazing video bro. Please make a video for vtable and vptrs.....
Ok coming soon
@@CppNuts please post vtable and vptr video
Sure, in few days i will start posting.
Bro, please make more videos, Thanks
Working on it!
where is the video link for VTable and VPointer???
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.
next video of vptr and vtable?
It's ready, need time to record it.
May be in 2 to 3 days.
@@CppNuts Can u please ping me the link here?
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
Your computer is using 32 bit processor ?
why don't you just make a makefile which could compile and run code for you?
That could save you unnecessary typing.
Thanks man..
bro are u from india , can i have u r instagram handle?
I don't use instagram :)