Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
cfd47022
Unverified
Commit
cfd47022
authored
Apr 05, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory leak
parent
84dd2187
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
CMakeLists.txt
+1
-1
changelog
+3
-0
src/category.cpp
+5
-10
No files found.
CMakeLists.txt
View file @
cfd47022
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
cmake_minimum_required
(
VERSION 3.16
)
cmake_minimum_required
(
VERSION 3.16
)
# set the project name
# set the project name
project
(
cifpp VERSION 5.0.
8
LANGUAGES CXX
)
project
(
cifpp VERSION 5.0.
9
LANGUAGES CXX
)
list
(
PREPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
list
(
PREPEND CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
...
...
changelog
View file @
cfd47022
Version
5.0.9
-
fix
memory
leak
in
category
Version
5.0.8
Version
5.0.8
-
implemented
find_first
,
find_min
,
find_max
and
count
in
category
-
implemented
find_first
,
find_min
,
find_max
and
count
in
category
-
find1
now
throws
an
exception
if
condition
does
not
not
exactly
match
one
row
-
find1
now
throws
an
exception
if
condition
does
not
not
exactly
match
one
row
...
...
src/category.cpp
View file @
cfd47022
...
@@ -600,7 +600,7 @@ category::category(const category &rhs)
...
@@ -600,7 +600,7 @@ category::category(const category &rhs)
for
(
auto
r
=
rhs
.
m_head
;
r
!=
nullptr
;
r
=
r
->
m_next
)
for
(
auto
r
=
rhs
.
m_head
;
r
!=
nullptr
;
r
=
r
->
m_next
)
insert_impl
(
end
(),
clone_row
(
*
r
));
insert_impl
(
end
(),
clone_row
(
*
r
));
if
(
m_cat_validator
!=
nullptr
)
if
(
m_cat_validator
!=
nullptr
and
m_index
==
nullptr
)
m_index
=
new
category_index
(
this
);
m_index
=
new
category_index
(
this
);
}
}
...
@@ -644,7 +644,7 @@ category &category::operator=(const category &rhs)
...
@@ -644,7 +644,7 @@ category &category::operator=(const category &rhs)
m_validator
=
rhs
.
m_validator
;
m_validator
=
rhs
.
m_validator
;
m_cat_validator
=
rhs
.
m_cat_validator
;
m_cat_validator
=
rhs
.
m_cat_validator
;
if
(
m_cat_validator
!=
nullptr
)
if
(
m_cat_validator
!=
nullptr
and
m_index
==
nullptr
)
m_index
=
new
category_index
(
this
);
m_index
=
new
category_index
(
this
);
}
}
...
@@ -655,9 +655,6 @@ category &category::operator=(category &&rhs)
...
@@ -655,9 +655,6 @@ category &category::operator=(category &&rhs)
{
{
if
(
this
!=
&
rhs
)
if
(
this
!=
&
rhs
)
{
{
if
(
not
empty
())
clear
();
m_name
=
std
::
move
(
rhs
.
m_name
);
m_name
=
std
::
move
(
rhs
.
m_name
);
m_columns
=
std
::
move
(
rhs
.
m_columns
);
m_columns
=
std
::
move
(
rhs
.
m_columns
);
m_cascade
=
rhs
.
m_cascade
;
m_cascade
=
rhs
.
m_cascade
;
...
@@ -665,12 +662,10 @@ category &category::operator=(category &&rhs)
...
@@ -665,12 +662,10 @@ category &category::operator=(category &&rhs)
m_cat_validator
=
rhs
.
m_cat_validator
;
m_cat_validator
=
rhs
.
m_cat_validator
;
m_parent_links
=
rhs
.
m_parent_links
;
m_parent_links
=
rhs
.
m_parent_links
;
m_child_links
=
rhs
.
m_child_links
;
m_child_links
=
rhs
.
m_child_links
;
m_index
=
rhs
.
m_index
;
m_head
=
rhs
.
m_head
;
m_tail
=
rhs
.
m_tail
;
rhs
.
m_head
=
rhs
.
m_tail
=
nullptr
;
std
::
swap
(
m_index
,
rhs
.
m_index
);
rhs
.
m_index
=
nullptr
;
std
::
swap
(
m_head
,
rhs
.
m_head
);
std
::
swap
(
m_tail
,
rhs
.
m_tail
);
}
}
return
*
this
;
return
*
this
;
...
...
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