1. Computing
Michael Morin

ObjectSpace

By September 30, 2013

Follow me on:

ObjectSpace is one of those features of Ruby you're likely to never use, or even if you do use it, only use it in a very, very edge case.  It's an interface to the object tracking that the garbage collector does and allows you to characterize the number of objects in memory, as well as iterate over them all (or all of a certain class).  While this is not immediately useful, it's sometimes fun to fire up IRB and see just how many objects your favorite library creates.  I'll give you a hint, it's a lot more than you think.

Comments
No comments yet. Leave a Comment
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.