Author Topic: OmniObjectMeter is an essential part of any Mac OS X developer's toolbox  (Read 1907 times)

0 Members and 1 Guest are viewing this topic.

Software Santa

  • Administrator
  • *****
  • Posts: 4268
OmniObjectMeter is an essential part of any Mac OS X developer's toolbox

OmniObjectMeter is an essential part of any Mac OS X developer's toolbox: a tool that makes it easy for Cocoa and Unix developers to find and fix memory leaks, excessive allocation operations, "zombies", prematurely deallocated objects, and other performance issues. The end product is faster and more robust applications.

Rather than searching through the thousands of objects and allocation events in a program, you can use OmniObjectMeter to quickly seek and destroy problematic code, and spend your time fixing problems rather than looking for them:

OmniObjectMeter shows allocated blocks, allocation events for each block, and the stack trace responsible for each allocation event. In the case of Cocoa or CoreFoundation objects, OmniObjectMeter also allows you to easily match retain events with their corresponding release events — once you have done this for a leaked object, there will be some number of extra retain events left unmatched which are causing the leak.

If a program accidentally keeps a pointer to a deallocated Cocoa or CoreFoundation object and later attempts to access that object, it's likely to crash. OmniObjectMeter integrates nicely with the built-in Cocoa support for detecting these so-called 'zombie' objects: By flipping a switch in OmniObjectMeter you can detect the first message to a zombie object and then look at the allocation event history for that object to determine why the object was prematurely deallocated.

OmniObjectMeter is also useful for optimizing memory usage. Since OmniObjectMeter shows you memory allocated split up by category, you can see how much memory each category is using. OmniObjectMeter can display the memory allocation events (or any other event type) for a category in a hierarchical tree formed from the stack trace responsible for each event. This allows you to see what portion of your code is responsible for what portion of the category's allocation usage, which makes it easy to identify and fix problem spots.

CPU utilization can be improved by reducing the number of needless allocation events. If the allocation and deallocation events for an object happen near each other in time, often the object really shouldn't have been deallocated anyway. Since OmniObjectMeter can easily group objects together to look at them on a category-by-category basis, you can use it to quickly find places where you're using lots of short-lived objects.

OmniObjectMeter integrates with Apple's Project Builder IDE: any place a stack frame is displayed, a source icon will appear next to the frame if appropriate debugging symbols are available in the application. Clicking on the icon will open the source file in Project Builder and select the correct line.


Welcome Visitor: