Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cd0ebac0
authored
Nov 02, 2015
by
Christian Kern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed wrong ordering destruction. First destruct, than deallocate.
parent
5192f502
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h
+3
-3
No files found.
containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h
View file @
cd0ebac0
...
@@ -254,19 +254,19 @@ LockFreeTreeValuePool<Type, Undefined, PoolAllocator, TreeAllocator>::
...
@@ -254,19 +254,19 @@ LockFreeTreeValuePool<Type, Undefined, PoolAllocator, TreeAllocator>::
size_t
tree_size_unsigned
=
static_cast
<
size_t
>
(
tree_size_
);
size_t
tree_size_unsigned
=
static_cast
<
size_t
>
(
tree_size_
);
size_t
real_size_unsigned
=
static_cast
<
size_t
>
(
real_size_
);
size_t
real_size_unsigned
=
static_cast
<
size_t
>
(
real_size_
);
pool_allocator_
.
deallocate
(
pool_
,
real_size_unsigned
);
// invoke destructor for each pool element
// invoke destructor for each pool element
for
(
size_t
i
=
0
;
i
!=
real_size_unsigned
;
++
i
)
{
for
(
size_t
i
=
0
;
i
!=
real_size_unsigned
;
++
i
)
{
pool_
[
i
].
~
Atomic
();
pool_
[
i
].
~
Atomic
();
}
}
tree_allocator_
.
deallocate
(
tree_
,
tree
_size_unsigned
);
pool_allocator_
.
deallocate
(
pool_
,
real
_size_unsigned
);
// invoke destructor for each tree element
// invoke destructor for each tree element
for
(
size_t
i
=
0
;
i
!=
tree_size_unsigned
;
++
i
)
{
for
(
size_t
i
=
0
;
i
!=
tree_size_unsigned
;
++
i
)
{
tree_
[
i
].
~
Atomic
();
tree_
[
i
].
~
Atomic
();
}
}
tree_allocator_
.
deallocate
(
tree_
,
tree_size_unsigned
);
}
}
template
<
typename
Type
,
Type
Undefined
,
class
PoolAllocator
,
template
<
typename
Type
,
Type
Undefined
,
class
PoolAllocator
,
...
...
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