I’m not sure that I am seeing memory issues, just tried shutting everything down on my system and leaving it when I went for dinner. I didn’t have any more memory used then when I left. Just had the mouse hovering over the
This works now, I just don’t think that you had things in scope.
rollout dnpb "" width:140 height:140
(
local acolor = dotnetclass "system.drawing.color"
local abrush = dotnetobject "System.Drawing.SolidBrush" acolor.yellow
local anotherbrush = dotnetobject "System.Drawing.SolidBrush" acolor.Fuchsia
dotnetcontrol pb "System.Windows.Forms.Picturebox" pos:[5,5] width:130 height:130
on pb paint e do
(
g = e.graphics
GDIsmoothing = dotnetclass "System.Drawing.Drawing2D.SmoothingMode"
g.SmoothingMode = GDIsmoothing.AntiAlias
g.FillRectangle abrush 3 3 124 124
g.FillEllipse anotherbrush 50 50 30 30
-- this line is problematic!!
g.dispose
)
on dnpb close do
(
-- as are these !!
abrush.dispose
anotherbrush.dispose
)
)
createdialog dnpb
