Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
665
Application Error - Not enough memory - MultiRowAutoSize
posted

Hello,

I am experiencing problems with UltraTabControl. My project is a gui with one ultratabcontrol, one fixed tabpage and n dynamically added tabpages. The appearance.image of each tabpage is assigned an image loaded from embeddee resource.

The tabpages are showed in Multirows (MultiRowAutoSize). This works fine so far. But as soon as I load an applicationstyling. The application crashes saying that there is not enough memory.

I could reproduce, that this is only in combination of all three factors

  • Load ISL-Style
  • Display image
  • Set TabLoyoutStyle to MultiRow...

I checked if maybe this is a problem of my userdefined style. So I created a new one from scratch using the cherry template. Same effect.

Attached you will find a project to reproduce this.

What can I do to avoid this error. I need these settings in a clients project.

Kind regards

Patrick

TabError.zip
Parents
  • 37774
    Verified Answer
    posted

    Patrick,

    This seems to be caused by closing the Stream object before the image can be fully rendered.  If you alter the attached sample to not close out the stream, you will see that it works correclty.  I looked at the code in Reflector for the constructor of the Bitmap class that takes a stream, and it seems that it will close the stream itself, so you should not have to worry about memory leaks with that either.

    -Matt

Reply Children