|
Boost : |
Subject: [boost] [root_ptr] Deterministic Javascript-like memory manager
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2017-07-08 23:10:52
Hello Boost / Qt,
After some experience I have gained in Javascript over the last year, I
decided to integrate root_ptr in a quest to replace their garbage collector.
So I did and I already have an example. If we mimic the Javascript
function scope in C++ then we'll have the following:
https://github.com/philippeb8/root_ptr/blob/develop/example/javascript_example1.cpp
The application was compiled with:
g++ -fpermissive -DBOOST_DISABLE_THREADS -std=c++11 -I../include
-I/usr/local/include -L/usr/local/lib -lboost_thread -lboost_system
javascript_example1.cpp
And it outputs:
Scope 0: BEGIN
Scope 1: BEGIN
A::A(const boost::node_proxy&)
A::A(const boost::node_proxy&)
A::~A()
Scope 1: END
A::~A()
Scope 0: END
Which is exactly what we want. Note that I didn't stress tested it yet
and in Brave New World we would be able to integrate it to other
languages relatively easily given Javascript is a worse-case scenario.
What do you think?
Regards,
-Phil
http://www.fornux.com
http://www.finitetheory.com
https://www.actatabula.com
https://github.com/philippeb8/root_ptr/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk