View Issue Details

IDProjectCategoryView StatusLast Update
0005229NoesisGUIC++ SDKpublic2026-09-30 13:33
Reporterianneufeld Assigned Tojsantos  
PrioritynormalSeverityminor 
Status feedbackResolutionopen 
Product Version4.0 
Target Version4.0.1 
Summary0005229: Better control over TRACK_ALIVE_OBJECTS, CRTDBG_LEAK_CHECK, etc
Description

Currently a number of defines that enable debugging features (e.g. for tracking memory leaks) similar are defined in specific .cpp files (BaseObject.cpp, Memory.cpp, etc).

This makes it hard to build multiple versions of dlls/libs for different use cases (e.g. an internal Debug/Profile version and an external Release version) without tedious manual edits to files when preparing the binaries or undesirable deviations from the "clean" source code.

It would be preferable to have these be passed in as project-level preprocessor definitions so that it's easy to enable/disable them for different build configurations.

PlatformAny

Activities

jsantos

jsantos

2026-09-30 13:33

manager   ~0012676

Last edited: 2026-09-30 13:33

The defines that are expected to change per build are located in BuildSettings.h. Each define is guarded by #ifndef, so you can override them globally in your project settings.

#ifndef NS_TRACK_XAML_SOURCE
    #define NS_TRACK_XAML_SOURCE 1
#endif

The defines in Memory.cpp and BaseObject.cpp are more local and are not intended to be configured per build. They are mainly there for local testing when investigating memory leaks. For example, CRTDBG_BREAK_ALLOC requires you to specify a particular allocation ID.

I could guard these defines with #ifndef as well, which would allow you to override them from your project settings. But I recommend handling memory leak detection on your side and using your own memory allocator.

Issue History

Date Modified Username Field Change
2026-09-30 02:11 ianneufeld New Issue
2026-09-30 10:27 sfernandez Assigned To => jsantos
2026-09-30 10:27 sfernandez Status new => assigned
2026-09-30 10:27 sfernandez Target Version => 4.0.1
2026-09-30 13:33 jsantos Note Added: 0012676
2026-09-30 13:33 jsantos Status assigned => feedback
2026-09-30 13:33 jsantos Note Edited: 0012676