Understood.
Can you give a link to that example you were talking about?

About the allocator/deallocator: if you don't manage to solve it, you may as well post it, maybe we can find some solution.

Why don't you use a QMutex instead of a QReadWriteLock?
In many cases, QReadWriteLock is a direct competitor to QMutex. QReadWriteLock is a good choice if there are many concurrent reads and writing occurs infrequently.
I believe a QMutex( actually you need two ) is more trustworthy . You could trace the errors easier than with a rw lock.

Regards