1 Jun 2007 01:09
Re: TDD and WeakReferences
jeffz_2002 <jeffz_2002 <at> yahoo.com>
2007-05-31 23:09:48 GMT
2007-05-31 23:09:48 GMT
Hi Rick. When I was testing my weak references (I'm assuming you're
testing to make sure they're garbage collected correctly), I just had
the objects increment a counter when created and decrement when
destroyed, and would check the counter value (a class variable).
If you can't control garbage collection in your environment, you may
need to use a separate test suite/program to check the memory allocated
for that process before and after the test... which might be kind of
tricky.
(sorry if this is too obvious and of no help)
Jeff
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/testdrivendevelopment/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/testdrivendevelopment/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:testdrivendevelopment-digest <at> yahoogroups.com
mailto:testdrivendevelopment-fullfeatured <at> yahoogroups.com
<*> To unsubscribe from this group, send an email to:
testdrivendevelopment-unsubscribe <at> yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
RSS Feed