Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P49
FlexArray memory leak case
Active
Public
Actions
Authored by
mduminer
on Dec 20 2019, 10:11 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
hpp
file
:
#include
"pawlib/flex_array.hpp"
#include
<iostream>
#include
<memory>
class
Container
{
public
:
Container
();
private
:
std
::
shared_ptr
<
FlexArray
<
FlexArray
<
int
>>>
array
;
};
void
test_flex_array
();
cpp
file
:
#include
"sandbox/flex_array_test.hpp"
Container
::
Container
()
{
array
=
std
::
make_shared
<
FlexArray
<
FlexArray
<
int
>>>
();
for
(
int
i
=
0
;
i
<
20
;
++
i
)
{
std
::
cout
<<
"Preparing to push inner # "
<<
i
<<
std
::
endl
;
auto
inner
=
FlexArray
<
int
>
();
array
->
push
(
inner
);
}
}
void
test_flex_array
()
{
Container
();
}
Event Timeline
mduminer
created this paste.
Dec 20 2019, 10:11 AM
2019-12-20 10:11:20 (UTC-8)
jcmcdonald
archived this paste.
Jan 11 2020, 3:22 PM
2020-01-11 15:22:14 (UTC-8)
jcmcdonald
activated this paste.
Log In to Comment