Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
533c4910
Commit
533c4910
authored
Dec 10, 2008
by
Mark Olesen
Browse files
dictionary: potential leak/odd behaviour - regexps cleared in the wrong place
parent
c6cf2e53
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/db/dictionary/dictionary.C
View file @
533c4910
...
...
@@ -48,9 +48,6 @@ bool Foam::dictionary::findInWildcards
{
if
(
wildCardEntries_
.
size
()
>
0
)
{
//wcLink = wildCardEntries_.begin();
//reLink = wildCardRegexps_.end();
while
(
wcLink
!=
wildCardEntries_
.
end
())
{
if
(
!
wildCardMatch
&&
wcLink
()
->
keyword
()
==
Keyword
)
...
...
@@ -510,10 +507,7 @@ bool Foam::dictionary::add(entry* entryPtr, bool mergeEntry)
wildCardEntries_
.
insert
(
entryPtr
);
wildCardRegexps_
.
insert
(
autoPtr
<
regExp
>
(
new
regExp
(
entryPtr
->
keyword
())
)
autoPtr
<
regExp
>
(
new
regExp
(
entryPtr
->
keyword
()))
);
}
...
...
@@ -776,6 +770,8 @@ void Foam::dictionary::clear()
{
IDLList
<
entry
>::
clear
();
hashedEntries_
.
clear
();
wildCardEntries_
.
clear
();
wildCardRegexps_
.
clear
();
}
...
...
src/OpenFOAM/db/dictionary/dictionaryIO.C
View file @
533c4910
...
...
@@ -137,9 +137,6 @@ Foam::Istream& Foam::operator>>(Istream& is, dictionary& dict)
functionEntries
::
inputModeEntry
::
clear
();
dict
.
clear
();
dict
.
hashedEntries_
.
clear
();
dict
.
wildCardEntries_
.
clear
();
dict
.
wildCardRegexps_
.
clear
();
dict
.
read
(
is
);
return
is
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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