c++ - Is everything cleaned up when using 'goto'? -


this question has answer here:

for (int = 0 ; < 10 ; ++i) {     (int j = 0 ; j < 10 ; ++j)     {         goto label;     } } label: // stuff 

after goto i , j variables freed? recall goto doesn't unwind stack or cleanup screw in case?

yeah, gets cleaned up. because c++ frees variables go out of scope.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

image - ClassNotFoundException when add a prebuilt apk into system.img in android -