@thomas
First this is not my code I'm trying to understand why it might crash...
Quote:
DeleteLayer will free all memory allocated by Create#?Layer, so your RastPort will be gone and you must not access it any more.
I feared this, can it be possible that such sort of things were possible with previous AOS memory allocator while it's not anymore in current AOS4's one ?
Quote:
The question is why you would need to extract the bitmap from the rastport although you already know it because you allocated it yourself ?
Because it's a port and the previous porter choosed to use the rastport as being the "handle" abstracted and carried along everywhere in the API. As such it is created in one function (the four first items), used in many other (symbolized by the fifth) , and deleted in another one (described by the four last items).
Quote:
The same applies to extracting the layer from the rastport when you extracted the rastport from the layer just before. A little too much "extracting" for my taste.
Same answer.
Quote:
And why do you InstallClipRegion(NULL) if you never did InstallClipRegion(anything) ?
Because I do but in another function. Anyway what nasty thing can it cause even if not clip were installed ?