Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/security/sandbox/chromium/base/win/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 904 B image not shown  

Quelle  scoped_localalloc.h

  Sprache: C
 

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_WIN_SCOPED_LOCALALLOC_H_
#define BASE_WIN_SCOPED_LOCALALLOC_H_

#include <memory>
#include <utility>

#include "base/win/windows_types.h"

namespace base {
namespace win {

// unique_ptr deleter for LocalAlloc memory.
struct LocalAllocDeleter {
  void operator()(void* ptr) const { ::LocalFree(ptr); }
};

template <typename T>
using ScopedLocalAllocTyped = std::unique_ptr<T, LocalAllocDeleter>;

using ScopedLocalAlloc = ScopedLocalAllocTyped<void>;

// Make a typed ScopedLocalAlloc class and clear the original pointer.
template <typename T>
ScopedLocalAllocTyped<T> TakeLocalAlloc(T*& ptr) {
  return ScopedLocalAllocTyped<T>(std::exchange(ptr, nullptr));
}

}  // namespace win
}  // namespace base

#endif  // BASE_WIN_SCOPED_LOCALALLOC_H_

Messung V0.5 in Prozent
C=78 H=100 G=89

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.