GNU bug report logs -
#3468
Support drag and drop of text on MS Windows
Previous Next
Full log
View this message in rfc822 format
On 05/10/2024 13:07, Eli Zaretskii wrote:
>> There is no malloc/strdup.
>
> Well, there are still 2 calls to malloc in w32_createwindow. Any
> reasons not to call xmalloc instead? Can w32_createwindow be called
> before we call init_heap?
[...]
> Do we ever have to free the two memory chunks we allocate here? Like
> when the window is disposed of?
They are freed in w32_drop_target_Release, which is called internally
when we call RevokeDragDrop while handling the WW_EMACS_DESTROYWINDOW on
w32_wnd_proc.
As this runs on the input thread, I used malloc/free instead of
xmalloc/xfree. I could send a message to handle on w32_read_socket and
then use xmalloc.
> This function should call block_input at entry and unblock_input
> before it exits, because we must make sure all the GlobalLock calls
> are paired with GlobalUnlock and GlobalFree, while functions we call
> here, process_dropfiles etc., all cons Lisp object, and therefore
> could potentially QUIT, which throws to top-level.
The function (w32_process_dnd_data) is called from within the
block_input/unblock_input on w32_read_socket.
Should I add its own calls for clarity? Maybe just a comment?
Thanks.
This bug report was last modified 265 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.