Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DrgAddStrHandle - memory of string needs to be preserved ?

0 views
Skip to first unread message

Lars Erdmann

unread,
Oct 21, 2009, 3:54:55 PM10/21/09
to
Hallo,

when I call DrgAddStrHandle, will the OS do a copy of the string I pass
to it or do I need to preserve the memory of the string the handle has
been created for?

Lars

Paul Ratcliffe

unread,
Oct 21, 2009, 4:29:58 PM10/21/09
to

Reading the PM Ref., one would reasonably expect the system to keep a copy
of the string as part of whatever data structure the handle refers to.

Rich Walsh

unread,
Oct 22, 2009, 1:25:43 AM10/22/09
to

String handles are atoms. If you look in Theseus, each app you've dragged
from has a 4k allocation in shared memory made by PMCTLS. AFAICT, this is
the drag atom table.


--
== == almost usable email address: Rich AT E-vertise.Com == ==
___________________________________________________________________
|
| DragText v3.9 with NLS support
Rich Walsh | A Distinctly Different Desktop Enhancement
Ft Myers, FL | http://e-vertise.com/dragtext/
___________________________________________________________________

Lars Erdmann

unread,
Oct 26, 2009, 3:54:49 PM10/26/09
to
Rich Walsh schrieb:

> On Wed, 21 Oct 2009 20:29:58 UTC, Paul Ratcliffe <ab...@orac12.clara34.co56.uk78> wrote:
>> On Wed, 21 Oct 2009 21:54:55 +0200, Lars Erdmann <lars.e...@arcor.de> wrote:
>>
>>> when I call DrgAddStrHandle, will the OS do a copy of the string I pass
>>> to it or do I need to preserve the memory of the string the handle has
>>> been created for?
>> Reading the PM Ref., one would reasonably expect the system to keep a copy
>> of the string as part of whatever data structure the handle refers to.
>
> String handles are atoms. If you look in Theseus, each app you've dragged
> from has a 4k allocation in shared memory made by PMCTLS. AFAICT, this is
> the drag atom table.
>
>
Hallo Rich,

ok, the handles are atoms but what does that mean for the strings
themselves ? Or are you saying that whenever something is represented as
an atom, that the original thing is copied by the system ?


Lars

Rich Walsh

unread,
Oct 27, 2009, 9:06:39 AM10/27/09
to
On Mon, 26 Oct 2009 19:54:49 UTC, Lars Erdmann <lars.e...@arcor.de> wrote:

> ok, the handles are atoms but what does that mean for the strings
> themselves ? Or are you saying that whenever something is represented as
> an atom, that the original thing is copied by the system ?

Yes.

0 new messages