For Programmers: Free Programming Magazines  


Home > Archive > Fortran > May 2006 > Re: Bounds Check Overhead









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Bounds Check Overhead
glen herrmannsfeldt

2006-05-31, 4:05 am

James Giles wrote:
> Richard E Maine wrote:


(snip)

(snip)
[color=darkred]
> True. Given the first, the second is reasonable. The first
> is not particularly reasonable. Having a function return
> a pointer is a good way to have memory leaks. And that's
> aside from the fact that I don't think the language should
> have pointers at all.


There are plenty of cases where functions returning pointers don't
cause memory leaks, though in some cases they do. Hash tables and
linked lists are popular uses of pointers.

Especially if you can make a generic pointer like (void*) in C or Object
in Java. If you can, then you can make a generic hash table or generic
linked list routine.

-- glen

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com