Show
Ignore:
Timestamp:
05/28/10 10:57:48 (5 years ago)
Author:
robert
Message:

Changed the ref_ptr<T> observer_ptr<>::lock() method to be
bool observer_ptr<>::lock(ref_ptr<T>&) to avoid the temporary ref_ptr<>'s
being created and destroyed on the stack along with the associated ref/unref() operations

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgfpdepth/osgfpdepth.cpp

    r11420 r11470  
    539539    { 
    540540        if (ea.getHandled()) return false; 
    541         ref_ptr<Depth> depth = _depth.lock(); 
    542         if (!depth.valid()) 
    543             return false; 
     541 
     542        ref_ptr<Depth> depth; 
     543        if (!_depth.lock(depth)) return false; 
     544 
    544545        switch(ea.getEventType()) 
    545546        {