--- Sean Arney <sean at rulessoftware dot com> wrote:
> >
> > Comments and suggestions welcome.
>
> Nice Mark!
Thanks. :)
> ...I would like to
> able to tell which object
> in the list is which object on the screen. For
> example, I have several
> listboxes in a window and one that I dump query
> results into. I suspect
> that either the recordset object or the listbox is
> hogging memory so I'd
> like to be able to tell which listbox object from
> the list is the one I
> suspect. Does that make sense?
Yeah, it makes sense, and I wanted that too.
Unfortunately the Runtime object supplies you with the
given object's ID and class, but it doesn't give
access to the object itself or any of the object's
other attributes. It would be nice if there was a
method you could use that you could pass the ObjectID
to and get back the actual object (or rather, a
Variant containing the object). On the other hand, if
you actually used that in a LeakCheck module, you'd be
creating additional references to the object, possible
creating memory leaks! Caveat coder. ;)
It's not an insurmountable obstacle; I suppose I could
put in a feature request. [Opens RS Feedback in
another window...]
Ok, done:
http://www.realsoftware.com/feedback/viewreport.php?reportid=afoxriob
> Actually I know the RBDatabase recordset swallows
> memory, but I would like
> to be able to have the Object somehow "show" in the
> app by doing something
> in the list. Any ideas?
You could vote for the feature request above; in the
meantime, if you create a subclass of one of the
listboxes and don't implement any methods or
properties, it will have a different class name, but
it will inherit everything else from ListBox, so it
will behave as a ListBox. Do this on a copy of your
project, and one of your listboxes will show up with a
different class name in the list, so you can at least
see which one is leaking. Likewise with any other
class you need to differentiate. Stupid kludge, and
you'd want to change your class back to plain ListBox
as soon as your done testing, or better yet revert to
the earlier version to avoid problems with
retrograding your classes. But I think it would get
the job done.
Mark Nutter
Quick and easy regex creation and debugging!
http://www.bucktailsoftware.com/products/regexplorer/
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|