>> These were my two first thoughts, but internally >> I think they both just create new string and may >> leave old buffer content around in an unreleased >> block. >> > > But if pw exists in a single instance, isn't it a waste to create a new item > to store a string of the same lenght?
Yes, speaking about STUFF(), it is, but to avoid it, you'd have to make several checks to verify whether there is room to optimize it on low level, so it's possible we wouldn't gain much at the end. In case of SPACE( LEN() ), it's two calls, and there is no clean for the HVM to optimize it like that. > Maybe I'm making things easier than they are... :) > > BTW, if a new item is created the old should go to recycleable memory and, as > such it still is present inside memory arena of running process, but should > not be accessible anymore. > > Am I wrong in both cases? :) If you save the memory area of a process using system tools, you can still access it. It can also get swapped out to page file. Of course it's difficult to clean such value from memory, since in most cases it's present in multiple copies, but I'd like to try minimizing the chance of it with some tricks, we will see how it goes. Current one is just a step in HBNETIOSRV to solve that, since accepting a pw from the command line isn't safe in the first place. Brgds, Viktor _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
