#282 intrusive_ptr for C#


Based on java source file. Works great for me.


  • Comment has been marked as spam. 

    You can see all pending comments posted by this user  here

    Anonymous - 2011-08-31
  • William Fulton

    William Fulton - 2011-09-13

    Thanks. I've removed the boost:: from boost::intrusive_ptr_add_ref to match the Java version given this info from the boost manual:

    The intrusive_ptr class template stores a pointer to an object with an embedded reference count. Every new intrusive_ptr instance increments the reference count by using an unqualified call to the function intrusive_ptr_add_ref, passing it the pointer as an argument. Similarly, when an intrusive_ptr is destroyed, it calls intrusive_ptr_release; this function is responsible for destroying the object when its reference count drops to zero. The user is expected to provide suitable definitions of these two functions. On compilers that support argument-dependent lookup, intrusive_ptr_add_ref and intrusive_ptr_release should be defined in the namespace that corresponds to their parameter; otherwise, the definitions need to go in namespace boost.

    A runtime test would be much appreciated using Examples/test-suite/li_boost_intrusive_ptr.i that was put together for Java, if you have some spare time.

  • William Fulton

    William Fulton - 2011-09-13
    • assigned_to: nobody --> wsfulton
    • status: open --> closed-accepted

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks