Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
9d7513ae
Commit
9d7513ae
authored
Jun 02, 2009
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx vout: another memleak
A memleak in the handling of NSAnimation
parent
61b0e2a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
modules/gui/macosx/embeddedwindow.m
modules/gui/macosx/embeddedwindow.m
+18
-11
No files found.
modules/gui/macosx/embeddedwindow.m
View file @
9d7513ae
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
[
o_temp_view
setAutoresizingMask
:
NSViewHeightSizable
|
NSViewWidthSizable
];
[
o_temp_view
setAutoresizingMask
:
NSViewHeightSizable
|
NSViewWidthSizable
];
o_fullscreen_window
=
nil
;
o_fullscreen_window
=
nil
;
o_fullscreen_anim1
=
o_fullscreen_anim2
=
nil
;
o_
makekey_anim
=
o_
fullscreen_anim1
=
o_fullscreen_anim2
=
nil
;
/* Not fullscreen when we wake up */
/* Not fullscreen when we wake up */
[
o_btn_fullscreen
setState
:
NO
];
[
o_btn_fullscreen
setState
:
NO
];
...
@@ -511,8 +511,8 @@
...
@@ -511,8 +511,8 @@
- Keep at most 2 animation at a time
- Keep at most 2 animation at a time
- leaveFullscreen/enterFullscreen are the only responsible for releasing and alloc-ing
- leaveFullscreen/enterFullscreen are the only responsible for releasing and alloc-ing
*/
*/
o_fullscreen_anim1
=
[[
NSViewAnimation
alloc
]
initWithViewAnimations
:[
NSArray
arrayWithObject
s
:
dict1
,
nil
]];
o_fullscreen_anim1
=
[[
NSViewAnimation
alloc
]
initWithViewAnimations
:[
NSArray
arrayWithObject
:
dict1
]];
o_fullscreen_anim2
=
[[
NSViewAnimation
alloc
]
initWithViewAnimations
:[
NSArray
arrayWithObject
s
:
dict2
,
nil
]];
o_fullscreen_anim2
=
[[
NSViewAnimation
alloc
]
initWithViewAnimations
:[
NSArray
arrayWithObject
:
dict2
]];
[
dict1
release
];
[
dict1
release
];
[
dict2
release
];
[
dict2
release
];
...
@@ -680,7 +680,11 @@
...
@@ -680,7 +680,11 @@
-
(
void
)
animationDidEnd
:(
NSAnimation
*
)
animation
-
(
void
)
animationDidEnd
:(
NSAnimation
*
)
animation
{
{
NSArray
*
viewAnimations
;
NSArray
*
viewAnimations
;
if
(
o_makekey_anim
==
animation
)
{
[
o_makekey_anim
release
];
return
;
}
if
([
animation
currentValue
]
<
1
.
0
)
if
([
animation
currentValue
]
<
1
.
0
)
return
;
return
;
...
@@ -724,17 +728,19 @@
...
@@ -724,17 +728,19 @@
[
super
setAlphaValue
:
0
.
0
f
];
[
super
setAlphaValue
:
0
.
0
f
];
[
super
makeKeyAndOrderFront
:
sender
];
[
super
makeKeyAndOrderFront
:
sender
];
NSMutableDictionary
*
dict
=
[[
[
NSMutableDictionary
alloc
]
initWithCapacity
:
2
]
autorelease
];
NSMutableDictionary
*
dict
=
[[
NSMutableDictionary
alloc
]
initWithCapacity
:
2
];
[
dict
setObject
:
self
forKey
:
NSViewAnimationTargetKey
];
[
dict
setObject
:
self
forKey
:
NSViewAnimationTargetKey
];
[
dict
setObject
:
NSViewAnimationFadeInEffect
forKey
:
NSViewAnimationEffectKey
];
[
dict
setObject
:
NSViewAnimationFadeInEffect
forKey
:
NSViewAnimationEffectKey
];
NSViewAnimation
*
anim
=
[[
NSViewAnimation
alloc
]
initWithViewAnimations
:[
NSArray
arrayWithObject
:
dict
]];
o_makekey_anim
=
[[
NSViewAnimation
alloc
]
initWithViewAnimations
:[
NSArray
arrayWithObject
:
dict
]];
[
dict
release
];
[
anim
setAnimationBlockingMode
:
NSAnimationNonblocking
];
[
o_makekey_anim
setAnimationBlockingMode
:
NSAnimationNonblocking
];
[
anim
setDuration
:
0
.
1
];
[
o_makekey_anim
setDuration
:
0
.
1
];
[
anim
setFrameRate
:
30
];
[
o_makekey_anim
setFrameRate
:
30
];
[
o_makekey_anim
setDelegate
:
self
];
[
anim
startAnimation
];
[
o_makekey_
anim
startAnimation
];
b_window_is_invisible
=
NO
;
b_window_is_invisible
=
NO
;
/* fullscreenAnimation will be unlocked when animation ends */
/* fullscreenAnimation will be unlocked when animation ends */
...
@@ -771,7 +777,8 @@
...
@@ -771,7 +777,8 @@
[
NSValue
valueWithRect
:[
self
frame
]],
NSViewAnimationStartFrameKey
,
[
NSValue
valueWithRect
:[
self
frame
]],
NSViewAnimationStartFrameKey
,
[
NSValue
valueWithRect
:
args
->
frame
],
NSViewAnimationEndFrameKey
,
nil
];
[
NSValue
valueWithRect
:
args
->
frame
],
NSViewAnimationEndFrameKey
,
nil
];
NSViewAnimation
*
anim
=
[[
NSViewAnimation
alloc
]
initWithViewAnimations
:[
NSArray
arrayWithObjects
:
dict
,
nil
]];
NSViewAnimation
*
anim
=
[[
NSViewAnimation
alloc
]
initWithViewAnimations
:[
NSArray
arrayWithObject
:
dict
]];
[
dict
release
];
[
anim
setAnimationBlockingMode
:
NSAnimationNonblocking
];
[
anim
setAnimationBlockingMode
:
NSAnimationNonblocking
];
[
anim
setDuration
:
0
.
4
];
[
anim
setDuration
:
0
.
4
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment