c++ - What happens when an uninitialised pointer variable is deleted in an infinite loop? -


suppose if execute infinite loop(sentinel) in there uninitialised pointer being deleted after every single execution of loop, question , possible pointer access system variables being used run computer? searched answer , found close 1 dangling pointers answers did not specify whether can have access or not system variables , , if has can deleted cause problem computer irrepairable? edit:( think created wrong impression doubt upon readers , never intend or have done in case such condition arises happen? question.)

what happens when uninitialised pointer variable deleted ...

assuming "deleted" mean delete ptr;, behavior undefined. if you're asking whether x could happen, answer yes, physically possible value of x. (operating systems have safeguards against rogue behavior individual programs. safeguards not 100% reliable.)

... in infinite loop?

that makes no difference.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -