Everyone;๐๐ปโโ๏ธ meet the dispose method.
๐The purpose of the dispose method is to perform all tasks related to freeing resources held by an object. Even if you stop on the Dispose method in Visual Studio, it says โRelease all resources used by the selected object.โ
In cases where resources are being used, we use Dispose method to tell the object: โ๐ฅธHey Bro!! Youโre done using the resource, free it so somebody else can use it๐ถโโ๏ธ.โ
If we donโt do this, it will cause bugs if something else is trying to use the same resource.
๐คSo, we call the dispose method to free it up as soon as the object is done using that resource.
To find more info you can visit this link:
https://lnkd.in/eH-pGTGC
Top comments (0)