http://d.puremagic.com/issues/show_bug.cgi?id=2927


Leandro Lucarella <llu...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |llu...@gmail.com


--- Comment #7 from Leandro Lucarella <llu...@gmail.com> 2009-11-03 06:57:17 
PST ---
(In reply to comment #5)
> The problem is, I don't see how an interior pointer could be prevented. You 
> can
> always take a slice to the interior array, so there is an interior pointer. I
> think it's a big risk to assume or tell the user not to slice the array,
> because they will, and then will suffer from mysterious memory errors.

But this shouldn't be set on any array, only on some private data where you can
ensure that no interior pointers exist.

Example:
----

class A
{
    private void* losts_of_pointers;
    this() {
        lots_of_pointers = new void*[100_000_000];
    }
}

It would be nice to be able to tell the GC "trust me, nobody will ever store an
interior pointer to this".

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to