Re: FindFirstFile Possible Memory Leak




"Robert Morley" <rmorley@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%237ylDSfrHHA.884@xxxxxxxxxxxxxxxxxxxxxxx
I see your point here, though in the end, I'm in agreement with Rick and
Bob
on this one.


And why not? <g>

Wirth and Dijkstra weren't dummies - Formal restrictions and Top-Down
programming works.


It's interesting what you say about adding to the stack during
the execution of the procedure, as it has the advantage of only consuming
as
many resources as necessary, but the obvious disadvantage that you have to
run code each time to allocate more memory, do whatever maintenance is
required, etc., instead of just doing it once at the beginning of the
function call. If you accidentally do this in a loop, there would be some
very significant performance hits, I would imagine.


Don't take my outline too literally. The 'addition' to the stack for
internal blocks takes place during the build not at runtime. And not all
compilers worked the same way. Loop optimization and deeper parsers for this
as well as other conditions soon changed the landscape.


Of course, as I've mentioned before, I really found Pascal to my liking
"back in the day"...the structure of it really appealed to me. So it
shouldn't be any wonder that I still tend to think and work in those
terms.


Again, why not? Wirth wasn't a dummy. At least Pascal was designed - Basic
sort of just grew. <g>

-ralph

<snipped>


.


Loading