Re: Object copy.
- From: Hans Breuer <hans breuer org>
- To: dia-list gnome org
- Subject: Re: Object copy.
- Date: Fri, 26 Aug 2011 22:01:03 +0200
At 26.08.2011 23:11, Paul Chavent wrote:
Hi.
I'm currently coding in c a new object.
I put a trace in my create handler, copy handler and destroy handler.
When i hit CTRL+C on my object there are three instance that are created.
Isn't the first one already there? So after ctrl+c there are three objects
exisiting.
When i close the file, two of them seem to be never destroyed.
Why never? They are just not immediately destroyed to allow later paste.
If i reopen a new file, when i hit CTRL+C, the two intermediate
instances are immediately destroyed.
This would also work by just hitting ctrl+c again.
My two questions are :
(1) is is a memory management that try to make some pool ?
No. There are just two independent copies. One is referenced for the gtk
clipboard; i gets used when you paste into another application. The other
one is used for the Dia internal copy and paste list. See
edit_copy_callback in app/commands.c for both uses.
(2) is there any way to know when the new object is really created
(pasted) ?
Wouldn't just paste answer that question for you? Yes it creates another
copy which is than referenced by the diagram.
Thanks for your help.
What is the problem you want to solve?
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]