mirror of
https://github.com/xfarrow/lasd.git
synced 2025-06-05 21:49:14 +02:00
Library 3
fixed memory leak issues + optimization
This commit is contained in:
@ -105,6 +105,7 @@ BinaryTreeVec<Data>::~BinaryTreeVec(){
|
||||
|
||||
template <typename Data>
|
||||
BinaryTreeVec<Data>& BinaryTreeVec<Data>::operator=(const BinaryTreeVec<Data>& bt){
|
||||
Clear();
|
||||
size = bt.size;
|
||||
tree.Resize(size);
|
||||
for(ulong i=0 ; i<size ; ++i){
|
||||
@ -116,6 +117,7 @@ BinaryTreeVec<Data>& BinaryTreeVec<Data>::operator=(const BinaryTreeVec<Data>& b
|
||||
|
||||
template <typename Data>
|
||||
BinaryTreeVec<Data>& BinaryTreeVec<Data>::operator=(BinaryTreeVec<Data>&& bt) noexcept{
|
||||
Clear();
|
||||
std::swap(size, bt.size);
|
||||
std::swap(tree, bt.tree);
|
||||
for(ulong i=0 ; i<size ; ++i){
|
||||
|
Reference in New Issue
Block a user