[Zope] Deleting objectreferences

Torsten Gallmeister galle@rostock.zgdv.de
Fri, 02 Mar 2001 18:14:10 +0100


Hi,

I use a class in my Product to make LDAP-queries :
------------------
class LDAP_Search:
        def __init__(self,res):
                .....

## and  use it in

def search_LDAPuser(self, uid):
    # open a connection
    l=ldap.open(LDAP_SERVER,LDAP_PORT)
    # search all users
    lst=l.search_s(LDAP_BASE_DN,ldap.SCOPE_SUBTREE,"uid=*",["uid","cn"])

    # create a List of
    u_lst=[]
    for i in lst:
        u_lst.append(LDAP_Search(i))
        return u_lst
----------------------
and I use it with <dtml-in> tags for different Forms.

After /Control_Panel/manage_debug I have many thousend objectreferences
to instances of this object.
I don't know whats the trouble. Don't want to store these objects. (at
start, ZOPE tryes to load the objects from the DB).
My question is, what is bad at this code? , is there a way to find out,
what referes to this objects or/and how to delete them from the DB?

Thanks for any help,
                                                                Torsten