-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

nick is not reference field. To make it sure that the issue is not
dependent on the field definition I checked it with as simple Field as
possible:

Field('trustworthiness', 'double', default=0),

defined in my model and added conversion to str:

    class Blah():
        def __init__(self):
            self.nick = str(db.person[1].trustworthiness)

    p = cache.ram('blahblah',Blah,time_expire=30)

Also,

def blah_f():
     return Blah()

makes no change, leads to the same leak.

The leak appears regardless to the place of the declaration of Blah
class. I tried to declare it in top level of model, in controller, and
inside function of controller, no difference.

It is possible that this IMO weird behaviour is related to another issue
which teased me months ago:

http://www.mail-archive.com/web2py@googlegroups.com/msg34333.html

With regards,
David

mdipierro wrote:
> It depends on whether nick is a reference field.
> 
> 
> On Jan 2, 5:31 pm, Michele Comitini <michele.comit...@gmail.com>
> wrote:
>> what if you do this?
>>
>> class Blah():
>>     def __init__(self):
>>         self.nick = db.person[1].nick
>>
>> def blah_f():
>>     return Blah()
>>
>>  p = cache.ram('blahblah', blah_f,time_expire=30)
>>
>> 2011/1/2 David Zejda <d...@atlas.cz>:
>>
>>

- --
David Zejda, Open-IT cz
web development & services
http://www.o-it.info
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAk0hoyEACgkQ3oCkkciamVGE0gCfROfrJo7SaeDxIbPco58LHzt9
mesAoK9JfcQKnGyAlkKfoeqIGKLJ812Z
=IBqT
-----END PGP SIGNATURE-----

Reply via email to