Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
798c883b
Commit
798c883b
authored
Dec 16, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/gui/skins2/*: fixed a whole bunch of memory leaks.
parent
799d80ce
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
10 deletions
+20
-10
modules/gui/skins2/parser/interpreter.cpp
modules/gui/skins2/parser/interpreter.cpp
+5
-5
modules/gui/skins2/parser/xmlparser.cpp
modules/gui/skins2/parser/xmlparser.cpp
+2
-0
modules/gui/skins2/src/theme.cpp
modules/gui/skins2/src/theme.cpp
+2
-2
modules/gui/skins2/src/theme_loader.cpp
modules/gui/skins2/src/theme_loader.cpp
+4
-0
modules/gui/skins2/src/theme_repository.cpp
modules/gui/skins2/src/theme_repository.cpp
+2
-0
modules/gui/skins2/vars/playlist.cpp
modules/gui/skins2/vars/playlist.cpp
+1
-1
modules/gui/skins2/x11/x11_display.cpp
modules/gui/skins2/x11/x11_display.cpp
+4
-2
No files found.
modules/gui/skins2/parser/interpreter.cpp
View file @
798c883b
...
@@ -186,14 +186,14 @@ VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme )
...
@@ -186,14 +186,14 @@ VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme )
{
{
VarManager
*
pVarManager
=
VarManager
::
instance
(
getIntf
()
);
VarManager
*
pVarManager
=
VarManager
::
instance
(
getIntf
()
);
// Convert the expression into Reverse Polish Notation
// Convert the expression into Reverse Polish Notation
ExprEvaluator
*
pEvaluator
=
new
ExprE
valuator
(
getIntf
()
);
ExprEvaluator
e
valuator
(
getIntf
()
);
pEvaluator
->
parse
(
rName
);
evaluator
.
parse
(
rName
);
list
<
VarBool
*>
varStack
;
list
<
VarBool
*>
varStack
;
// Get the first token from the RPN stack
// Get the first token from the RPN stack
string
token
=
pEvaluator
->
getToken
();
string
token
=
evaluator
.
getToken
();
while
(
!
token
.
empty
()
)
while
(
!
token
.
empty
()
)
{
{
if
(
token
==
"and"
)
if
(
token
==
"and"
)
...
@@ -295,7 +295,7 @@ VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme )
...
@@ -295,7 +295,7 @@ VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme )
varStack
.
push_back
(
pVar
);
varStack
.
push_back
(
pVar
);
}
}
// Get the first token from the RPN stack
// Get the first token from the RPN stack
token
=
pEvaluator
->
getToken
();
token
=
evaluator
.
getToken
();
}
}
// The stack should contain a single variable
// The stack should contain a single variable
...
...
modules/gui/skins2/parser/xmlparser.cpp
View file @
798c883b
...
@@ -149,11 +149,13 @@ bool XMLParser::parse()
...
@@ -149,11 +149,13 @@ bool XMLParser::parse()
}
}
handleBeginElement
(
eltName
,
attributes
);
handleBeginElement
(
eltName
,
attributes
);
free
(
eltName
);
map
<
const
char
*
,
const
char
*
,
ltstr
>
::
iterator
it
=
map
<
const
char
*
,
const
char
*
,
ltstr
>
::
iterator
it
=
attributes
.
begin
();
attributes
.
begin
();
while
(
it
!=
attributes
.
end
()
)
while
(
it
!=
attributes
.
end
()
)
{
{
free
(
(
char
*
)
it
->
first
);
free
(
(
char
*
)
it
->
second
);
free
(
(
char
*
)
it
->
second
);
it
++
;
it
++
;
}
}
...
...
modules/gui/skins2/src/theme.cpp
View file @
798c883b
...
@@ -45,8 +45,7 @@ void Theme::loadConfig()
...
@@ -45,8 +45,7 @@ void Theme::loadConfig()
// Get config from vlcrc file
// Get config from vlcrc file
char
*
save
=
config_GetPsz
(
getIntf
(),
"skins2-config"
);
char
*
save
=
config_GetPsz
(
getIntf
(),
"skins2-config"
);
if
(
save
==
NULL
)
if
(
!
save
)
return
;
return
;
// Initialization
// Initialization
map
<
string
,
TopWindowPtr
>::
const_iterator
it
;
map
<
string
,
TopWindowPtr
>::
const_iterator
it
;
...
@@ -75,6 +74,7 @@ void Theme::loadConfig()
...
@@ -75,6 +74,7 @@ void Theme::loadConfig()
// Next window
// Next window
i
++
;
i
++
;
}
}
free
(
save
);
}
}
...
...
modules/gui/skins2/src/theme_loader.cpp
View file @
798c883b
...
@@ -97,6 +97,7 @@ bool ThemeLoader::load( const string &fileName )
...
@@ -97,6 +97,7 @@ bool ThemeLoader::load( const string &fileName )
// Show the windows
// Show the windows
pNewTheme
->
getWindowManager
().
showAll
();
pNewTheme
->
getWindowManager
().
showAll
();
}
}
if
(
skin_last
)
free
(
skin_last
);
return
true
;
return
true
;
}
}
...
@@ -244,6 +245,7 @@ bool ThemeLoader::findThemeFile( const string &rootDir, string &themeFilePath )
...
@@ -244,6 +245,7 @@ bool ThemeLoader::findThemeFile( const string &rootDir, string &themeFilePath )
// Can we find the theme file in this subdirectory?
// Can we find the theme file in this subdirectory?
if
(
findThemeFile
(
newURI
,
themeFilePath
)
)
if
(
findThemeFile
(
newURI
,
themeFilePath
)
)
{
{
closedir
(
pCurrDir
);
return
true
;
return
true
;
}
}
}
}
...
@@ -254,6 +256,7 @@ bool ThemeLoader::findThemeFile( const string &rootDir, string &themeFilePath )
...
@@ -254,6 +256,7 @@ bool ThemeLoader::findThemeFile( const string &rootDir, string &themeFilePath )
string
(
pDirContent
->
d_name
)
)
string
(
pDirContent
->
d_name
)
)
{
{
themeFilePath
=
newURI
;
themeFilePath
=
newURI
;
closedir
(
pCurrDir
);
return
true
;
return
true
;
}
}
}
}
...
@@ -262,6 +265,7 @@ bool ThemeLoader::findThemeFile( const string &rootDir, string &themeFilePath )
...
@@ -262,6 +265,7 @@ bool ThemeLoader::findThemeFile( const string &rootDir, string &themeFilePath )
pDirContent
=
readdir
(
pCurrDir
);
pDirContent
=
readdir
(
pCurrDir
);
}
}
closedir
(
pCurrDir
);
return
false
;
return
false
;
}
}
...
...
modules/gui/skins2/src/theme_repository.cpp
View file @
798c883b
...
@@ -135,6 +135,8 @@ void ThemeRepository::parseDirectory( const string &rDir )
...
@@ -135,6 +135,8 @@ void ThemeRepository::parseDirectory( const string &rDir )
pDirContent
=
readdir
(
pDir
);
pDirContent
=
readdir
(
pDir
);
}
}
closedir
(
pDir
);
}
}
...
...
modules/gui/skins2/vars/playlist.cpp
View file @
798c883b
...
@@ -34,7 +34,7 @@ Playlist::Playlist( intf_thread_t *pIntf ): VarList( pIntf )
...
@@ -34,7 +34,7 @@ Playlist::Playlist( intf_thread_t *pIntf ): VarList( pIntf )
m_pPlaylist
=
pIntf
->
p_sys
->
p_playlist
;
m_pPlaylist
=
pIntf
->
p_sys
->
p_playlist
;
// Try to guess the current charset
// Try to guess the current charset
char
*
pCharset
=
(
char
*
)
malloc
(
100
)
;
char
*
pCharset
;
vlc_current_charset
(
&
pCharset
);
vlc_current_charset
(
&
pCharset
);
iconvHandle
=
vlc_iconv_open
(
"UTF-8"
,
pCharset
);
iconvHandle
=
vlc_iconv_open
(
"UTF-8"
,
pCharset
);
msg_Dbg
(
pIntf
,
"Using character encoding: %s"
,
pCharset
);
msg_Dbg
(
pIntf
,
"Using character encoding: %s"
,
pCharset
);
...
...
modules/gui/skins2/x11/x11_display.cpp
View file @
798c883b
...
@@ -211,8 +211,10 @@ X11Display::X11Display( intf_thread_t *pIntf ): SkinObject( pIntf ),
...
@@ -211,8 +211,10 @@ X11Display::X11Display( intf_thread_t *pIntf ): SkinObject( pIntf ),
// Set an empty mask for the window
// Set an empty mask for the window
Region
mask
=
XCreateRegion
();
Region
mask
=
XCreateRegion
();
XShapeCombineRegion
(
m_pDisplay
,
m_mainWindow
,
ShapeBounding
,
0
,
0
,
mask
,
XShapeCombineRegion
(
m_pDisplay
,
m_mainWindow
,
ShapeBounding
,
0
,
0
,
ShapeSet
);
mask
,
ShapeSet
);
XDestroyRegion
(
mask
);
// Map the window
// Map the window
XMapWindow
(
m_pDisplay
,
m_mainWindow
);
XMapWindow
(
m_pDisplay
,
m_mainWindow
);
...
...
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