On 11/5/14 2:05 PM, Patrick Jeeves wrote:
On Wednesday, 5 November 2014 at 18:56:08 UTC, luminousone wrote:
unless delete is explicitly called, I don't believe the destructor
would ever be called, it would still have a reference in the static
foo_list object that would stop it from being collect
On Wednesday, 5 November 2014 at 17:45:00 UTC, luminousone wrote:
abstract class foo {
static DList!foo foo_list;
~this(){ foo_list.remove(this); }
One note: when your program exits the runtime does a final GC
cycle and collects those things calling destructors/finalizers,
however the
On Wednesday, 5 November 2014 at 20:31:54 UTC, Patrick Jeeves
wrote:
On Wednesday, 5 November 2014 at 19:44:57 UTC, luminousone
wrote:
On Wednesday, 5 November 2014 at 19:05:32 UTC, Patrick Jeeves
wrote:
On Wednesday, 5 November 2014 at 18:56:08 UTC, luminousone
wrote:
unless delete is explicit
On Wednesday, 5 November 2014 at 19:44:57 UTC, luminousone wrote:
On Wednesday, 5 November 2014 at 19:05:32 UTC, Patrick Jeeves
wrote:
On Wednesday, 5 November 2014 at 18:56:08 UTC, luminousone
wrote:
unless delete is explicitly called, I don't believe the
destructor would ever be called, it wo
On Wednesday, 5 November 2014 at 19:05:32 UTC, Patrick Jeeves
wrote:
On Wednesday, 5 November 2014 at 18:56:08 UTC, luminousone
wrote:
unless delete is explicitly called, I don't believe the
destructor would ever be called, it would still have a
reference in the static foo_list object that woul
On Wednesday, 5 November 2014 at 18:56:08 UTC, luminousone wrote:
unless delete is explicitly called, I don't believe the
destructor would ever be called, it would still have a
reference in the static foo_list object that would stop it from
being collected by the gc.
This is exactly why I ask
On Wednesday, 5 November 2014 at 18:18:18 UTC, Ali Çehreli wrote:
On 11/05/2014 10:12 AM, Adam D. Ruppe wrote:
> On Wednesday, 5 November 2014 at 18:10:38 UTC, Ali Çehreli
wrote:
>> If so, then that push_back would be adding an incomplete
object to the
>> list.
>
> scope(success)?
I really like
On 11/05/2014 10:12 AM, Adam D. Ruppe wrote:
> On Wednesday, 5 November 2014 at 18:10:38 UTC, Ali Çehreli wrote:
>> If so, then that push_back would be adding an incomplete object to the
>> list.
>
> scope(success)?
I really like that! :)
But still not for this case because in addition to the p
On Wednesday, 5 November 2014 at 18:10:38 UTC, Ali Çehreli wrote:
If so, then that push_back would be adding an incomplete object
to the list.
scope(success)?
But the D translation worries me too because the destructor won't
run at the same time as the C++ version, unless you make it a
scop
On 11/05/2014 10:07 AM, Ali Çehreli wrote:
> On 11/05/2014 09:17 AM, Patrick Jeeves wrote:
>
> > class foo
> > {
> > static std::list foo_list;
> > typedef std::list::iterator iterator;
> > public:
> > foo()
> > {
> > foo_list.push_back(this);
> > }
Argh! I forgot
On 11/05/2014 09:17 AM, Patrick Jeeves wrote:
> class foo
> {
> static std::list foo_list;
> typedef std::list::iterator iterator;
> public:
> foo()
> {
> foo_list.push_back(this);
> }
> ~foo()
> {
> foo_list.remove(this);
> }
Going completely off-to
On Wednesday, 5 November 2014 at 17:17:11 UTC, Patrick Jeeves
wrote:
So this is more a stackoverflow question, but I feel like later
searchers will be more likely to find it if I put it here.
if I have the following C++ code:
class foo
{
static std::list foo_list;
typedef std::list::iterator i
So this is more a stackoverflow question, but I feel like later
searchers will be more likely to find it if I put it here.
if I have the following C++ code:
class foo
{
static std::list foo_list;
typedef std::list::iterator iterator;
public:
foo()
{
foo_list.push_back(this);
13 matches
Mail list logo