On 03/11/2008 22:09, Tommaso Cucinotta wrote:
Sure, this shouldn't have been committed. Though, it was
there to remind myself the question: who is responsible for
destroying the additional WorkArea(s), Buffer(s) and BufferView(s) ?

AFAICS, if the search buffer is added to theBufferList(), then it is
automatically destroyed somewhere at program exit.

Yes that's the way it should be.

However, that
was causing additional problems, so for now I didn't add it to
theBufferList(). However, the search workarea is automatically
destroyed if it is the current one at program exit.

Should the dialog destructor be the only responsible for destroying
the contained buffer, bufferview and workarea (similarly to the
lyxview for document buffers) ?

No, this is not a normal buffer. The dialog is responsible for the WorkArea which in turn is responsible for the BufferView. Destroying the BufferView won't destroy automatically close the Buffer so you are on the safe side.

Any useful suggestion here ?
What is the lifecycle of the clipboard buffer, for example ?

It is created the first time a clipboard operation is called and destroyed on exit in the BufferList destructor. You should do exactly the same IMO.

Abdel.

Reply via email to