What is dangling pointer?

dangling pointer in c

Pointers that don't point to a substantial question of the appropriate type. Dangling pointers emerge when a question is erased or deallocated, without changing the estimation of the pointer, so the pointer still indicates the memory area of the deallocated memory. As the framework may reallocate the recently liberated memory to another procedure, on the off chance that the first program, dereferences the (now) dangling pointer, capricious conduct may result, as the memory may now contain totally extraordinary information. This is particularly the situation if the program composes information to memory pointed by a dangling pointer, as quiet defilement of irrelevant information may result, prompting unpretentious bugs that can be to a great degree hard to discover, or cause division issues (*NIX) or general insurance shortcomings (Windows).

Post a Comment

0 Comments