[Issue 2927] Ignore Interior GC attribute

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 3 06:57:18 PST 2009


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


Leandro Lucarella <llucax at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |llucax at gmail.com


--- Comment #7 from Leandro Lucarella <llucax at 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: -------


More information about the Digitalmars-d-bugs mailing list