It also kind of depends on how the system manages memory. I could see a system over writing freed memory with nulls as a security measure.
If the system does overwrite memory, with nulls, then the it would work as your describe it in Linux. Bruce On Sep 30, 2009, at 9:18 PM, Mark Miesfeld wrote: > On Wed, Sep 30, 2009 at 9:07 PM, CVBruce <[email protected]> wrote: > >> Ok, I've been starring at this code, and I think that I understand it >> now. >> >> The question I have is this. >> >> I can see where the memory that was alloc'd for the environmental >> variable. I can see where the memory is free'd. But I don't see >> where the pointer to the memory is set to a null-pointer value. So >> the array of pointers, still has a pointer to the free'd memory. >> Does >> that make sense? > > Bruce, that's the way I read it also. I did post on the devel list, > Rick usually has good insight to this. > > The thing is, if in the array of pointers, that pointer was set to > null, then the next time the function was entered, the for loop would > end prematurely: > > for(;*Environment != NULL;Environment++){ > np = *Environment; > > But, yeah, it looks to me like the array of pointers now has a pointer > to free'd memory. It seems to work in Linux though. I usually work > on Windows. I booted up a Linux system to look at this earlier, I'd > have to boot up a system again to look more closely at the array. > > -- > Mark Miesfeld > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart > your > developing skills, take BlackBerry mobile applications to market and > stay > ahead of the curve. Join us from November 9-12, 2009. Register > now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Oorexx-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/oorexx-devel ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel
