ダングリング参照
「ダングリング参照」を扱った13問。日付を開くと、その日のドリルがそのまま読めます。日付の横の動物は難易度で、ハリネズミ・孔雀・バイソン・クジラの順に重くなります。
- C++ / DEBUG · 2026-11-04 ためた挨拶が名前を失う std::function, ラムダの参照キャプチャ, ダングリング参照, 寿命, type erasure, capture by reference, dangling reference, use after scope
- Zig / DEBUG · 2026-11-03 実行時の++を返す 配列の連結, 実行時の++, ローカル変数へのスライス, 寿命, dangling slice, array concatenation at runtime, stack memory
- Zig / DEBUG · 2026-11-02 Writerを値で取り出す std.Io.Writer, interface, @fieldParentPtr, 構造体のコピー, File.Writer, vtable, copying the interface
- C++ / DEBUG · 2026-10-11 メモ化したコラッツの歩数 参照の無効化, vector の再確保, 再帰とメモ化, 代入の評価順序, reference invalidation, vector reallocation, recursive memoization, use after free
- C++ / DEBUG · 2026-10-03 連番のポートを返す initializer_listを返す, 背後の配列の寿命, auto x = {}, dangling initializer_list, backing array lifetime
- C / DEBUG · 2026-09-30 mainの変数と終了処理 atexit, mainからのreturn, 自動変数の寿命, ダングリングポインタ, return from main, automatic storage duration, exit handler
- C++ / DEBUG · 2026-09-24 参照キャプチャの罠 ダングリング参照, ローカル変数の参照キャプチャ, dangling reference, use after return, lambda capture
- C++ / DEBUG · 2026-09-20 一時値への参照を返す ダングリング参照, 一時オブジェクト, 戻り値, dangling reference
- C++ / DEBUG · 2026-09-10 thisのキャプチャと再配置 thisのキャプチャ, vectorの再配置, ダングリングポインタ, deque, capturing this, vector reallocation, dangling this, use after free
- Zig / DEBUG · 2026-08-31 使い回した行バッファ splitScalar, スライス, バッファの使い回し, 別名, 共有されたメモリ, slice aliasing, buffer reuse, borrowed slice
- Zig / DEBUG · 2026-08-30 消えた配列を指すスライス ダングリングポインタ, ローカル変数のアドレス, スライスを返す, 配列を値で返す, dangling slice, stack memory
- C++ / DEBUG · 2026-08-22 返してはいけない参照 ダングリング参照, 局所変数, 寿命, dangling reference
- C / DEBUG · 2026-08-20 局所変数への参照 ダングリングポインタ, 局所変数, 寿命, dangling pointer