--- nono/vm/gvram.cpp 2026/04/29 17:04:28 1.1 +++ nono/vm/gvram.cpp 2026/04/29 17:04:35 1.1.1.3 @@ -1,10 +1,11 @@ // // nono -// Copyright (C) 2018 isaki@NetBSD.org +// Copyright (C) 2020 nono project +// Licensed under nono-license.txt // #include "gvram.h" -#include "vicon.h" +#include "videoctlr.h" // // GVRAM @@ -13,7 +14,7 @@ // バイトアクセス時は HB() マクロを使用のこと。 // -GVRAMDevice *gGVRAM; +std::unique_ptr gGVRAM; GVRAMDevice::GVRAMDevice() { @@ -22,12 +23,11 @@ GVRAMDevice::GVRAMDevice() devaddr = 0xc00000; devlen = 0x200000; // XXX とりあえず - mem = new uint8[devlen]; + mem.reset(new uint8[devlen]); } GVRAMDevice::~GVRAMDevice() { - delete[] mem; } uint64