Hashtable 04 class implementation doubt

in line number 15 " this->key=key" , what does this means

hi @udaycodingblocks ,
this is used to differentiate btw key which u are passing as argument and the key attribute of the class
you can also avoid this and just write key = parameter name (other than key)
eg key = val (and change name of the parameter to val instead of key)

what is the purpose of destructor here?

@udaycodingblocks Destructors are used to destroy the objects created by the Constructors when they are not needed anymore to release the memory, so here also you need to clear up what you have created

@udaycodingblocks is the doubt clear?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.