{"id":2544,"date":"2022-08-30T15:25:45","date_gmt":"2022-08-30T15:25:45","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/29\/simple-destroctor-question-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:25:45","modified_gmt":"2022-08-30T15:25:45","slug":"simple-destroctor-question-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/simple-destroctor-question-collection-of-common-programming-errors\/","title":{"rendered":"Simple Destroctor Question-Collection of common programming errors"},"content":{"rendered":"<p>Hi .I try to\u00a0run \u00a0the follwoing \u00a0code .But it throws runtime exception while its trying to delete this in get function.But according to me it should give exception while the program termination.Even i have try to proint in destructor but its not printinig.Plz tell me the reason in deteails.<\/p>\n<p>class sample{\u00a0 int m;\u00a0public:\u00a0sample()\u00a0{\u00a0}\u00a0 void get()\u00a0{\u00a0\/\/\u00a0m=5;\u00a0\u00a0cout<\/p>\n<p id=\"rop\"><small>Originally posted 2014-01-29 17:33:05. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Hi .I try to\u00a0run \u00a0the follwoing \u00a0code .But it throws runtime exception while its trying to delete this in get function.But according to me it should give exception while the program termination.Even i have try to proint in destructor but its not printinig.Plz tell me the reason in deteails. class sample{\u00a0 int m;\u00a0public:\u00a0sample()\u00a0{\u00a0}\u00a0 void get()\u00a0{\u00a0\/\/\u00a0m=5;\u00a0\u00a0cout [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2544","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2544"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2544\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}