Skip to content

fpGUI minor code improvement suggestions #128

Description

@deanm73

These are small code improvements that might make the framework slightly more robust:

src/corelib/fpg_msgqueue.inc
procedure fpgInitMsgQueue;
after line "uMsgQueueList := TList.Create;"
add "uMsgQueueList.Capacity := cMessageQueueSize;"

procedure fpgDeliverMessage
replace "msg.Dest.Free"
with "FreeAndNil(msg.Dest)"

src/corelib/fpg_main.pas
procedure TfpgApplication.RunMessageLoop;
reduce timeout from "WaitWindowMessage(2000);"
to "WaitWindowMessage(100);"

src/corelib/fpg_widget.pas
procedure procedure TfpgWidget.MsgPaint
put code between "Canvas.BeginDraw;" and "Canvas.EndDraw" into try...finally

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions