Re: Erasing strings from memory?
Paul Swartz <[email protected]>
| Newsgroups | gmane.comp.python.cryptography |
|---|---|
| Message-ID | <3DCFBA97.20468.7F172@localhost> |
On 11 Nov 2002 at 6:47, Rich Salz wrote:
> > Be careful with this: Python strings are immutable and some
> > are shared. The code you gave below can result in a
> > completely broken Python interpreter.
>
> Good point. Check that refcount==1 before actual memset.
> /r$
I don't know. I liked that the old code cleared
all the references to the string so I don't have
to worry about misc. references sitting around
keeping this string in memory. Does python really
care if strings change on it?
-p
--
Paul Swartz
(o_ http://twistedmatrix.com/users/z3p.twistd/
//\ [email protected]
V_/_ AIM: Z3Penguin