Carl Banks writes:
> On Apr 9, 11:23 pm, Hrvoje Niksic wrote:
>> a...@pythoncraft.com (Aahz) writes:
>> > BTW, note that if you're using Python 2.x, range(100) will cause
>> > a "leak" because ints are never freed. Instead, use xrange().
>>
>> Note that using xrange() won't help with that p
On Apr 9, 11:23 pm, Hrvoje Niksic wrote:
> a...@pythoncraft.com (Aahz) writes:
> > BTW, note that if you're using Python 2.x, range(100) will cause
> > a "leak" because ints are never freed. Instead, use xrange().
>
> Note that using xrange() won't help with that particular problem.
I think
a...@pythoncraft.com (Aahz) writes:
> BTW, note that if you're using Python 2.x, range(100) will cause
> a "leak" because ints are never freed. Instead, use xrange().
Note that using xrange() won't help with that particular problem.
--
http://mail.python.org/mailman/listinfo/python-list
In article <41d95468-8f7a-4647-83e1-6df147744...@u8g2000yqn.googlegroups.com>,
k3xji wrote:
>
>When I run the following function, I seem to have a mem leak, a 20 mb
>of memory
>is allocated and is not freed. Here is the code I run:
>
import esauth
for i in range(100):
>
>... ss
On Apr 7, 2:10 pm, John Machin wrote:
> On Apr 7, 9:19 pm, MRAB wrote:
>
>
>
> > k3xji wrote:
> > > Interestaing I changed malloc()/free() usage with PyMem_xx APIs and
> > > the problem resolved. However, I really cannot understand why the
> > > first version does not work. Here is the latest cod
Carl Banks gmail.com> writes:
> However, Python apparently does leak a reference if passed a Unicode
> object; PyArg_ParseTuple automatically creates an encoded string but
> never decrefs it. (That might be necessary evil to preserve
> compatibility, though. PyString_AS_STRING does it too.)
Uni
On Apr 7, 9:19 pm, MRAB wrote:
> k3xji wrote:
> > Interestaing I changed malloc()/free() usage with PyMem_xx APIs and
> > the problem resolved. However, I really cannot understand why the
> > first version does not work. Here is the latest code that has no
> > problems at all:
>
> > static PyObjec
k3xji wrote:
Interestaing I changed malloc()/free() usage with PyMem_xx APIs and
the problem resolved. However, I really cannot understand why the
first version does not work. Here is the latest code that has no
problems at all:
static PyObject *
penc(PyObject *self, PyObject *args)
{
Py
Interestaing I changed malloc()/free() usage with PyMem_xx APIs and
the problem resolved. However, I really cannot understand why the
first version does not work. Here is the latest code that has no
problems at all:
static PyObject *
penc(PyObject *self, PyObject *args)
{
PyObject * result
On Apr 7, 12:01 am, k3xji wrote:
> When I run the following function, I seem to have a mem leak, a 20 mb
> of memory
> is allocated and is not freed. Here is the code I run:
>
> >>> import esauth
> >>> for i in range(100):
>
> ... ss = esauth.penc('sumer')
> ...
>
> >>> for i in range(1000
When I run the following function, I seem to have a mem leak, a 20 mb
of memory
is allocated and is not freed. Here is the code I run:
>>> import esauth
>>> for i in range(100):
... ss = esauth.penc('sumer')
...
>>> for i in range(100):
... ss = esauth.penc('sumer')
...
And here
11 matches
Mail list logo