Ruby Memory Validator Tutorial
This document is intended to augment the information in the Ruby Memory Validator Help file. If you have not read the help file we encourage you to do so. Ruby Memory Validator is a powerful and complex product, reading the help manual will help you use Ruby Memory Validator more efficiently.
This tutorial describes how to use Ruby Memory Validator to perform memory leak detection in a Ruby application.
Ruby is a garbage collected language. Memory leaks happen using garbage collected languages when references to objects that are no longer required are not released. The failure to release the reference prevents the garbage collector from correctly identifying the memory as garbage and thus prevents the memory from being collected.
This tutorial will show you how to use Ruby Memory Validator to detect and analyse memory leaks in your Ruby application using the supplied rmvExample.rb application to demonstrate a typical memory leak and the various facilities Ruby Memory Validator provides you to aid you in the task of identifying and analysing a memory leak.
The tutorial is split into several sections:
- The example application.
- Launching the application.
- Introducing the data views.
- Detecting the memory leak.
- Fixing the memory leak.
- Checking the memory leak is fixed.
- Working with Ruby on Rails.
If you would like a tutorial on how to use Ruby Memory Validator to perform a given task, we will be happy to provide a tutorial, just let us know what topics you need the tutorial to cover. Send your suggestions to support@softwareverify.com.

