Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
poppler
poppler
Commits
3f0679a3
Commit
3f0679a3
authored
Jan 06, 2007
by
Albert Astals Cid
Browse files
Patch by Pino Toscano <pino@kde.org> to fix some memory leaks when dealing with sounds.
parent
d41cd2f5
Changes
6
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
3f0679a3
2007-01-06 Albert Astals Cid <aacid@kde.org>
* poppler/Sound.cc
* qt4/src/poppler-link.cc
* qt4/src/poppler-link.h
* qt4/src/poppler-page.cc
* qt4/src/poppler-sound.cc: Patch by Pino Toscano
<pino@kde.org> to fix some memory leaks when dealing with sounds.
2007-01-04 Albert Astals Cid <aacid@kde.org>
* qt4/src/poppler-private.h: gmallocn -> new[]
...
...
poppler/Sound.cc
View file @
3f0679a3
...
...
@@ -57,6 +57,7 @@ Sound::Sound(Object *obj)
Sound
::~
Sound
()
{
streamObj
->
free
();
delete
streamObj
;
}
Stream
*
Sound
::
getStream
()
...
...
qt4/src/poppler-link.cc
View file @
3f0679a3
...
...
@@ -258,6 +258,11 @@ namespace Poppler {
{
}
LinkSound
::~
LinkSound
()
{
delete
m_sound
;
}
Link
::
LinkType
LinkSound
::
linkType
()
const
{
return
Sound
;
...
...
qt4/src/poppler-link.h
View file @
3f0679a3
...
...
@@ -215,6 +215,7 @@ class LinkSound : public Link
public:
// create a Link_Sound
LinkSound
(
const
QRectF
&
linkArea
,
double
volume
,
bool
sync
,
bool
repeat
,
bool
mix
,
SoundObject
*
sound
);
virtual
~
LinkSound
();
LinkType
linkType
()
const
;
...
...
qt4/src/poppler-page.cc
View file @
3f0679a3
...
...
@@ -398,9 +398,13 @@ Link *Page::action( PageAction act ) const
dict
->
lookup
(
key
,
&
o2
);
::
LinkAction
*
act
=
::
LinkAction
::
parseAction
(
&
o2
,
m_page
->
parentDoc
->
m_doc
->
doc
.
getCatalog
()
->
getBaseURI
()
);
o2
.
free
();
o
.
free
();
Link
*
popplerLink
=
NULL
;
if
(
act
!=
NULL
)
{
popplerLink
=
m_page
->
convertLinkActionToLink
(
act
,
QRectF
(),
m_page
->
parentDoc
->
m_doc
);
delete
act
;
}
return
popplerLink
;
}
return
0
;
...
...
qt4/src/poppler-sound.cc
View file @
3f0679a3
...
...
@@ -39,6 +39,12 @@ public:
:
m_channels
(
1
),
m_bitsPerSample
(
8
),
m_soundEncoding
(
SoundObject
::
Raw
),
m_soundObj
(
new
Object
()
)
{
m_soundObj
->
initNull
();
}
~
SoundData
()
{
m_soundObj
->
free
();
delete
m_soundObj
;
}
QVariant
m_data
;
SoundObject
::
SoundType
m_type
;
double
m_samplingRate
;
...
...
@@ -135,7 +141,6 @@ SoundObject::SoundObject(const SoundObject &s)
SoundObject
::~
SoundObject
()
{
m_soundData
->
m_soundObj
->
free
();
delete
m_soundData
;
}
...
...
Write
Preview
Supports
Markdown
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