Menu

#5 Use premade instances where possible

open-postponed
nobody
None
5
2011-06-23
2011-05-27
No

In .NET there are a lot of premade static readonly instances of classes for common usage. If C# SDL used them instead of creating new instances all the time, it should be possible to gain performance and reduce overhead.

Examples:
new System.Drawing.Point(0, 0) can be written as System.Drawing.Point.Empty
new System.Drawing.Size(0, 0) can be written as System.Drawing.Size.Empty
...

Indirectly related: It would be nice, if C# SDL consequently used String.Empty instead of "". Right now it is a bit mixed which can be irritating.

Discussion

  • Stefan Ekman

    Stefan Ekman - 2011-06-23

    A lot of the things above is in the taosdl-library and not in SDL.Net. We will look into this when we build our own version of tao, but for now we will not change it.

     
  • Stefan Ekman

    Stefan Ekman - 2011-06-23
    • labels: 1599429 -->
    • status: open --> open-postponed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.