• Kirill Smelkov's avatar
    libgolang: Objects refcounting (initial draft) · e82b4fab
    Kirill Smelkov authored
    Since we are going to move more pygolang functionality into C++ (timers,
    context, ...), and since C++ does not have garbage collector, we will
    need to find a way to automatically manage memory in leak/error free way.
    
    Let's do this via refptr<T> smart pointer (inspired by WebKit's RefPtr<T>),
    which, similarly to chan<T> automatically manages pointed object's
    lifetime through reference counting.
    
    refptr<T> will be used in follow-up patches.
    
    Top-level documentation is TODO.
    e82b4fab
libgolang.cpp 36 KB