Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
zeromemory string state question
#1
why some times when i do zeromemory for long string it does not get cleared from memory 

i do something like some times when i click on button 4 or 5 times i can see this text in memory viewer


Code:
procedure TForm1.OnClick(Sender: TObject);
var
 pstr: string;
begin
 pstr := 'abcdefghijklmnobqrsputwjdgdfkljfhghjfggffhgfj;

 ZeroMemory(@(pstr[1]), Length(pstr)*SizeOf(Char));

 pstr:='';

end;
Reply


Messages In This Thread
zeromemory string state question - by Madammar - 08-27-2018, 12:39 AM
RE: zeromemory string state question - by kudzu - 08-27-2018, 02:53 PM
RE: zeromemory string state question - by rlebeau - 08-27-2018, 08:00 PM
RE: zeromemory string state question - by kudzu - 08-28-2018, 04:51 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)