2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
6 #include "StackTrace.h"
9 StackTrace::StackTrace()
14 StackTrace::~StackTrace()
16 for (int32 i
= 0; StackFrame
* frame
= FrameAt(i
); i
++)
17 frame
->ReleaseReference();
22 StackTrace::AddFrame(StackFrame
* frame
)
24 if (fStackFrames
.AddItem(frame
))
27 frame
->ReleaseReference();
33 StackTrace::CountFrames() const
35 return fStackFrames
.CountItems();
40 StackTrace::FrameAt(int32 index
) const
42 return fStackFrames
.ItemAt(index
);