BitScript is an experimental language that compiles to both JavaScript and C++. Memory management is done using annotations for shared and owned pointers. These annotations are thrown away when compiling to JavaScript but are converted to smart pointers when compiling to C++.