View Issue Details

IDProjectCategoryView StatusLast Update
0035987LazarusLCLpublic2019-08-23 15:57
Reportertimothy902Assigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityN/A
Status assignedResolutionopen 
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;
var
  MainWidget: PGtkObject;
begin
  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);
end;
TagsNo tags attached.
Fixed in Revision
LazTarget
WidgetsetGTK 2
Attached Files

Activities

There are no notes attached to this issue.

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