Stack overflow
David
d at dav1d.de
Fri Jun 22 10:59:48 PDT 2012
Am 22.06.2012 16:55, schrieb Namespace:
> If you have a null object you get an Access Violation without _any_
> further information. That totally sucks.
I don't know what you're doing or which debugger you use, gdb shows me
exactly what happened (line + stack + object).
> And in my opinion a small "Ref!Type" is more informative for others who
> use your code and you do not have to write assert(obj !is null); any
> time in any method again.
I hope nobody will share code with Ref!Type, if they do people will
relay on it and hey, all will do it, I don't need to check here, would
be something different if it was not implemented by any library.
> And yes my program start's first with a debugger but, as i said, you
> will only get "Access Violation" and must debug by yourself to find the
> null object, if you avoid assert's.
I have to debug nothing, as written above gdb sets automatically a
breakpoint on a segmentation fault and shows me all the information I need.
More information about the Digitalmars-d-learn
mailing list