(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:
Alexander Malmberg 2003-03-29 20:12:07 +00:00
parent e8b48a1755
commit 2bd5b9f6b6
2 changed files with 14 additions and 1 deletions

View file

@ -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>
* Source/NSMenuView.m:

View file

@ -4278,6 +4278,12 @@ byExtendingSelection: (BOOL)flag
lastEvent = theEvent;
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;
switch ([lastEvent type])
{
@ -4470,8 +4476,9 @@ byExtendingSelection: (BOOL)flag
inMode: NSEventTrackingRunLoopMode
dequeue: YES];
}
DESTROY(arp);
}
if (startedPeriodicEvents == YES)
[NSEvent stopPeriodicEvents];