www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4151] New: Add weak references to Phobos/druntime

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4151

           Summary: Add weak references to Phobos/druntime
           Product: D
           Version: future
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: nfxjfg gmail.com


--- Comment #0 from nfxjfg gmail.com 2010-05-02 20:55:00 PDT ---
Just that.

The Java API documentation may provide a good starting point as to what weak
references should be able to do:
http://java.sun.com/javase/7/docs/api/java/lang/ref/WeakReference.html

Note that finalizers and the "hidden" rt_attach.../detach... functions are
highly unsafe and hard to get right. As an example what can go wrong if users
try to implement their own weak references, see bug 4150.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 02 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4151


nfxjfg gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 06 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4151


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |braddr puremagic.com
         Resolution|INVALID                     |


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 06 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4151


Denis Shelomovskij <verylonglogin.reg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |verylonglogin.reg gmail.com


--- Comment #1 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-03-16
15:06:59 MSK ---
Even worse GC lock/unlock aren't parts of a druntime user API so one have to
use ugly things like calling addRange/removeRange to ensure the memory will not
be collected.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 16 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4151



--- Comment #2 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-10-08
13:58:32 MSD ---
One can use this implementation for now:
http://denis-sh.bitbucket.org/unstandard/unstd.memory.weakref.html

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 08 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4151



--- Comment #3 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-10-16
13:58:28 MSD ---
A proposal to add library implementation without runtime changes:
http://forum.dlang.org/thread/l3dj7b$2tvc$1 digitalmars.com

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