View Issue Details

IDProjectCategoryView StatusLast Update
0035987LazarusLCLpublic2019-10-04 20:56
Reportertimothy902Assigned ToJuha Manninen 
Status resolvedResolutionfixed 
Product VersionProduct Buildlazarus#61730 
Target VersionFixed in Version 
Summary0035987: GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
DescriptionThe code below is repeatedly printing the debug message "GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.", which is either a false warning or a indeed a memory leak. Sadly I could not reproduce the issue, because my first test scenario did not invoke that code.

function GetOrCreateWidgetInfo(const AWidget: Pointer): PWidgetInfo;
  MainWidget: PGtkObject;
  if AWidget = nil then Exit(nil);
  MainWidget := GetMainWidget(AWidget);
  Result := g_object_get_data(PGObject(MainWidget), 'widgetinfo');
  if Assigned(Result) then Exit;
  Result := CreateWidgetInfo(MainWidget);
  DebugLn('GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.');
  // use the main widget as default
  Result^.CoreWidget := PGtkWidget(MainWidget);
TagsNo tags attached.
Fixed in Revision
WidgetsetGTK 2
Attached Files


Juha Manninen

2019-10-04 20:56

developer   ~0118335

No more DebugLn(). Resolving.

Issue History

Date Modified Username Field Change
2019-08-20 09:31 timothy902 New Issue
2019-08-23 15:57 Juha Manninen Assigned To => Juha Manninen
2019-08-23 15:57 Juha Manninen Status new => assigned
2019-10-04 20:56 Juha Manninen Status assigned => resolved
2019-10-04 20:56 Juha Manninen Resolution open => fixed
2019-10-04 20:56 Juha Manninen LazTarget => -
2019-10-04 20:56 Juha Manninen Widgetset GTK 2 => GTK 2
2019-10-04 20:56 Juha Manninen Note Added: 0118335