cleanup questions?

hénon meinrad.recheis at gmx.at
Sun Jan 26 14:56:43 EST 2003


hi, i have two questions:

1) How do i get a list of all existing (previously generated) objects in the
interpreters namespace?
    and is there a command to clean them all up?

2) How do I clean up JFrames in Jython?

    a) I found that this doesn t really kill a frame:
    f = JFrame()
    f.visible=1
    #frame will be displayed
    del f
    # now f is removed from namespace, but the frame is still visible/in
memory

    b) there is this method dispose()
    f.dispose()
    # frame disappears and according to java.awt.Window's doc also frees its
memory,  but...
    print f
    # the frame is still there in jython as string-rep..
    # ok then
    del f

    is this the right way to kill it completely?








More information about the Python-list mailing list