Cause of Wild Pointers
Wild pointers are created by omitting necessary initialization prior to first use. Thus, strictly speaking, every pointer in programming languages which do not enforce initialization begins as a wild pointer.
This most often occurs due to jumping over the initialization, not by omitting it. Most compilers are able to warn about this.
int f(int i) { char *dp; /* dp is a wild pointer */ static char *scp; /* scp is not a wild pointer: * static variables are initialized to 0 * at start and retain their values from * the last call afterwards. * Using this feature may be considered bad * style if not commented */ }Read more about this topic: Dangling Pointer
Famous quotes containing the word wild:
“The only ones who are really grateful for the war are the wild ducks, such a lot of them in the marshes of the Rhone and so peaceful ... because all the shot-guns have been taken away completely taken away and nobody can shoot with them nobody at all and the wild ducks are very content. They act as of they had never been shot at, never, it is so easy to form old habits again, so very easy.”
—Gertrude Stein (18741946)