🇬🇧
Styio Developer Manual
English
English
  • Overview
  • Unka's Diary
    • 2024-2025
  • Dev Env
    • Introduction
    • Preparation
      • Windows
      • Linux
      • MacOS
    • LLVM
    • Docker
      • Pull Image
      • Create Container
      • Versions
      • Others
    • Visual Studio Code
    • MSVC
  • Rules
    • 1. Pay only what you need.
  • Milestones
    • Task Board
    • History
    • IF YOU DON'T KNOW WHAT TO DO
  • Possible Optimizations
    • Parse URLs
  • Dark Magic
    • Enable Hyper-V
  • Thinking
    • Add A New AST
    • Decisions
    • Questions
    • Other Questions
    • Value
    • Outcome
Powered by GitBook
On this page
  1. Thinking

Decisions

Raw Pointer vs Smart Pointers

I chose raw pointer over smart pointers because there is no such "memory leak" in a compiler, especially for the compiler that only runs once: after generating the LLVM bitcode file, the compiler ends its life and LLVM should concern the rest of things. The only thing matters is the generated code but not the compiler itself. We need to think about how to make the generated bitcode more memory-safe rather than think a very short-lived compiler.

PreviousAdd A New ASTNextQuestions

Last updated 1 year ago