Want to say I agree with Greg on this one, but did want to answer one
question you had.

On Tue, Oct 7, 2014 at 10:15 PM, Matthew Gardiner <m...@csr.com> wrote:

> On Tue, 2014-10-07 at 17:10 -0700, Greg Clayton wrote:
> > It is quite common for shared libraries to have initialize and terminate
> calls. We have this in LLDB.
>
> Agreed. Lots of libraries have to initialise resource, then release the
> resource upon terminate.
>
> But why have an Initialise method when you _already_ have a Create
> method? Likewise a Terminate method when you _already_ have a Destroy
> method.
>
> Surely when a "thing" is created that is also when it is initialised?


Initialize() initializes global state that is a pre-requisite for using
*any* SBDebugger instance.  Create() creates a single instance of an
SBDebugger, assuming that the global state has already been initialized.
You can have multiple SBDebuggers, but you can only Initialize() once.
_______________________________________________
lldb-dev mailing list
lldb-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to