mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 01:21:05 +00:00
(mouseDown:) Wrap each iteration of the mouse tracking loop in an autorelease pool.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16289 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e8b48a1755
commit
2bd5b9f6b6
2 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2003-03-28 21:08 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
|
* Source/NSTableView.m (mouseDown:): Wrap each iteration of the mouse
|
||||||
|
tracking loop in an autorelease pool to avoid using huge amounts of
|
||||||
|
memory if the button is held down a long time.
|
||||||
|
|
||||||
2003-03-28 Serg Stoyan <stoyan@on.com.ua>
|
2003-03-28 Serg Stoyan <stoyan@on.com.ua>
|
||||||
|
|
||||||
* Source/NSMenuView.m:
|
* Source/NSMenuView.m:
|
||||||
|
|
|
@ -4278,6 +4278,12 @@ byExtendingSelection: (BOOL)flag
|
||||||
lastEvent = theEvent;
|
lastEvent = theEvent;
|
||||||
while (done != YES)
|
while (done != YES)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
Wrap each iteration in an autorelease pool. Otherwise, we end
|
||||||
|
up allocating huge amounts of objects if the button is held
|
||||||
|
down for a long time.
|
||||||
|
*/
|
||||||
|
CREATE_AUTORELEASE_POOL(arp);
|
||||||
BOOL shouldComputeNewSelection = NO;
|
BOOL shouldComputeNewSelection = NO;
|
||||||
switch ([lastEvent type])
|
switch ([lastEvent type])
|
||||||
{
|
{
|
||||||
|
@ -4470,8 +4476,9 @@ byExtendingSelection: (BOOL)flag
|
||||||
inMode: NSEventTrackingRunLoopMode
|
inMode: NSEventTrackingRunLoopMode
|
||||||
dequeue: YES];
|
dequeue: YES];
|
||||||
}
|
}
|
||||||
|
DESTROY(arp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (startedPeriodicEvents == YES)
|
if (startedPeriodicEvents == YES)
|
||||||
[NSEvent stopPeriodicEvents];
|
[NSEvent stopPeriodicEvents];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue