Click here to Skip to main content
15,886,664 members
Articles / Programming Languages / C++

Dangling Pointers: Pathology, Prevention and Cure

Rate me:
Please Sign up or sign in to vote.
4.83/5 (49 votes)
11 Nov 2012CPOL12 min read 66.1K   403   61  
Dangling pointers were a problem in the past, but nowadays we'll find none, right? Guess again...

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DanglingPointer", "DanglingPointer.vcproj", "{D552498C-CDE3-4342-B66A-CCC69AD247A9}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Win32 = Debug|Win32
		Release|Win32 = Release|Win32
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{D552498C-CDE3-4342-B66A-CCC69AD247A9}.Debug|Win32.ActiveCfg = Debug|Win32
		{D552498C-CDE3-4342-B66A-CCC69AD247A9}.Debug|Win32.Build.0 = Debug|Win32
		{D552498C-CDE3-4342-B66A-CCC69AD247A9}.Release|Win32.ActiveCfg = Release|Win32
		{D552498C-CDE3-4342-B66A-CCC69AD247A9}.Release|Win32.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Israel Israel
Pablo writes code for a living, in C++, C#, and SQL.

To make all that work easier, he uses some C++ libraries: STL, ATL & WTL (to write Windows applications), and code generation.

Pablo was born in 1963, got married in 1998, and is the proud father of two wonderful girls.

Favorite quotes:
"Accident: An inevitable occurrence due to the action of immutable natural laws." (Ambrose Bierce, "The Devil's Dictionary", published in several newspapers between 1881 and 1906).
"You are to act in the light of experience as guided by intelligence" (Rex Stout, "In the Best Families", 1950).

Comments and Discussions