StevensDeptECE / GrailGUI

GrailGUI is a prototype of a replacement for web programming (HTTP, HTML, CSS, JavaScript) and GUI programming. It includes a client graphical API, a browser implemented in C++ and OpenGL, a protocol to transmit metadata and data in binary, a language (XDL) to describe the binary data, and local storage to retain data on the client should that be necessary. Encrypted communications (equivalent of TLS) have not yet been implemented.
GNU General Public License v3.0
7 stars 14 forks source link

XDLTypes adding themselves to types array #64

Open ahuston-0 opened 2 years ago

ahuston-0 commented 2 years ago

Just pushed in f7bd03a and came across a weird instance. Apparently, we previously created XDLTypes and then added them to the type array in the constructor. Is there a particular reason why we decided to do this in the constructor of adding them externally? Only asking because the syntax looked something like types.add(this) and XDLType::classInit was filled with lines resembling new U8(). Seems like it would have been easy to end up with a dangling reference if something bad ever happened to the types array.