ZeroedMemoryAllocator Class Reference

Base class that provides memory initialization on dynamically created objects. More...

#include <alloc_type.hpp>

Inheritance diagram for ZeroedMemoryAllocator:
GRFError NWidgetBase Window WindowDesc NWidgetContainer NWidgetResizeBase AboutWindow AIConfigWindow AIDebugWindow AIListWindow AISettingsWindow BaseGraphWindow BaseVehicleListWindow BuildAirToolbarWindow BuildBridgeWindow BuildDocksToolbarWindow BuildIndustryWindow BuildRailToolbarWindow BuildRoadToolbarWindow BuildTreesWindow BuildVehicleWindow BuyCompanyWindow CheatWindow CompanyFinancesWindow CompanyLeagueWindow CompanyStationsWindow CompanyWindow CreateScenarioWindow CustomCurrencyWindow DepotWindow DropdownWindow EndGameHighScoreBaseWindow EnginePreviewWindow ErrmsgWindow ExtraViewportWindow GameDifficultyWindow GameOptionsWindow GameSettingsWindow GenerateProgressWindow GraphLegendWindow IConsoleWindow IndustryDirectoryWindow IndustryViewWindow LandInfoWindow MainToolbarWindow MainWindow MessageHistoryWindow MessageOptionsWindow MusicTrackSelectionWindow MusicWindow NetworkClientListPopupWindow NetworkClientListWindow NetworkContentDownloadStatusWindow NetworkJoinStatusWindow NetworkLobbyWindow NewGRFWindow NewsWindow OrdersWindow OskWindow PerformanceRatingDetailWindow PickerWindowBase QueryStringBaseWindow QueryWindow RefitWindow ReplaceVehicleWindow ScenarioEditorLandscapeGenerationWindow ScenarioEditorToolbarWindow SelectCompanyLiveryWindow SelectCompanyManagerFaceWindow SelectGameWindow SelectStationWindow< T > SetDateWindow SignListWindow SmallMapWindow StationViewWindow StatusBarWindow SubsidyListWindow TerraformToolbarWindow TimetableWindow TooltipsWindow TownAuthorityWindow TownDirectoryWindow TownViewWindow TransparenciesWindow VehicleDetailsWindow VehicleViewWindow WaypointWindow

Public Member Functions

FORCEINLINE void * operator new (size_t size)
 Memory allocator for a single class instance.
FORCEINLINE void * operator new[] (size_t size)
 Memory allocator for an array of class instances.
FORCEINLINE void operator delete (void *ptr)
 Memory release for a single class instance.
FORCEINLINE void operator delete[] (void *ptr)
 Memory release for an array of class instances.

Detailed Description

Base class that provides memory initialization on dynamically created objects.

All allocated memory will be zeroed.

Definition at line 150 of file alloc_type.hpp.


Member Function Documentation

FORCEINLINE void ZeroedMemoryAllocator::operator delete ( void *  ptr  )  [inline]

Memory release for a single class instance.

Parameters:
ptr the memory to free.

Reimplemented in Window.

Definition at line 174 of file alloc_type.hpp.

FORCEINLINE void ZeroedMemoryAllocator::operator delete[] ( void *  ptr  )  [inline]

Memory release for an array of class instances.

Parameters:
ptr the memory to free.

Definition at line 180 of file alloc_type.hpp.

FORCEINLINE void* ZeroedMemoryAllocator::operator new ( size_t  size  )  [inline]

Memory allocator for a single class instance.

Parameters:
size the amount of bytes to allocate.
Returns:
the given amounts of bytes zeroed.

Definition at line 161 of file alloc_type.hpp.

FORCEINLINE void* ZeroedMemoryAllocator::operator new[] ( size_t  size  )  [inline]

Memory allocator for an array of class instances.

Parameters:
size the amount of bytes to allocate.
Returns:
the given amounts of bytes zeroed.

Reimplemented in Window.

Definition at line 168 of file alloc_type.hpp.


The documentation for this class was generated from the following file:

Generated on Sat Nov 20 21:00:34 2010 for OpenTTD by  doxygen 1.6.1