Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
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
Marco Bubke
flatpak-qt-creator
Commits
fcb6c498
Commit
fcb6c498
authored
Feb 22, 2010
by
Christian Kamm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a memory leak with the QmlJS scope chain.
parent
28e348ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
src/libs/qmljs/qmljsinterpreter.cpp
src/libs/qmljs/qmljsinterpreter.cpp
+19
-0
src/libs/qmljs/qmljsinterpreter.h
src/libs/qmljs/qmljsinterpreter.h
+3
-3
src/libs/qmljs/qmljslink.cpp
src/libs/qmljs/qmljslink.cpp
+1
-0
No files found.
src/libs/qmljs/qmljsinterpreter.cpp
View file @
fcb6c498
...
...
@@ -731,6 +731,25 @@ ScopeChain::ScopeChain()
{
}
ScopeChain
::
QmlComponentChain
::
QmlComponentChain
()
:
rootObject
(
0
),
ids
(
0
)
{
}
ScopeChain
::
QmlComponentChain
::~
QmlComponentChain
()
{
qDeleteAll
(
instantiatingComponents
);
}
void
ScopeChain
::
QmlComponentChain
::
clear
()
{
qDeleteAll
(
instantiatingComponents
);
instantiatingComponents
.
clear
();
rootObject
=
0
;
functionScopes
.
clear
();
ids
=
0
;
}
void
ScopeChain
::
QmlComponentChain
::
add
(
QList
<
const
ObjectValue
*>
*
list
)
const
{
foreach
(
QmlComponentChain
*
parent
,
instantiatingComponents
)
...
...
src/libs/qmljs/qmljsinterpreter.h
View file @
fcb6c498
...
...
@@ -229,9 +229,8 @@ public:
struct
QmlComponentChain
{
QmlComponentChain
()
:
rootObject
(
0
),
ids
(
0
)
{}
QmlComponentChain
();
~
QmlComponentChain
();
QList
<
QmlComponentChain
*>
instantiatingComponents
;
const
ObjectValue
*
rootObject
;
...
...
@@ -239,6 +238,7 @@ public:
const
ObjectValue
*
ids
;
void
add
(
QList
<
const
ObjectValue
*>
*
list
)
const
;
void
clear
();
};
const
ObjectValue
*
globalScope
;
...
...
src/libs/qmljs/qmljslink.cpp
View file @
fcb6c498
...
...
@@ -48,6 +48,7 @@ void Link::scopeChainAt(Document::Ptr doc, const QList<Node *> &astPath)
if
(
doc
->
qmlProgram
())
{
_context
->
setLookupMode
(
Context
::
QmlLookup
);
scopeChain
.
qmlComponentScope
.
clear
();
makeComponentChain
(
doc
,
&
scopeChain
.
qmlComponentScope
,
&
componentScopes
);
if
(
const
ObjectValue
*
typeEnvironment
=
_context
->
typeEnvironment
(
doc
.
data
()))
...
...
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