How much memory can a shared NSPasteboard take?

Shared NSPasteboard saves files that the user has copied. For example, like 100 images and 1000 words. Is there a size limit on the overall NSPasteboard so that the user can copy, say, 99 maximum images?

What determines this limit? RAM or HD or ..?

+4
source share
1 answer

Yes.

There is no documented forced restriction (which I could find) on cardboard size. However, of course. If you copy too many materials onto any cardboard (whether it be general cardboard, "Find cardboard", "drag" or any other), you will either reach the undocumented limit or you will manage the system in paging hell. (Even this last part is not really guaranteed, and the file cabinet uses RAM for the last time I checked, but theoretically it could be written to disk instead now or in the future.)

If you plan to copy a large amount of data, I suggest promising it. How you do this depends on whether you use the old type and data API or the new element based API. This works more, but that means you only need to bring this data when the user inserts it somewhere.

+4
source

Source: https://habr.com/ru/post/1383295/


All Articles