U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » Stream Load serialization fired twice
Re: Stream Load serialization fired twice [message #61330 is a reply to message #61328] Thu, 26 December 2024 18:41 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
luoganda wrote on Wed, 25 December 2024 23:56
Calling LoadFromFile stream in
"bool Load(Event<Stream&> serialize, Stream& stream, int version){ ..."
calls user function "void XUserClass::Serialize(Stream& s){..." twice.
Once with backup.SetStoring(); flag and once with stream.SetLoading();.
Both are called from Core/Stream.cpp at 1287 in "bool Load(Event<Stream&> serialize, ...".

I don't think this is normal, since user callback is fired twice.


The first one is to backup current data so that they can be restored in the event that loading fails...
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Doubt with Buffer<> of a trivially destructible type
Next Topic: GetSmartTextSize() fails with QTF text
Goto Forum:
  


Current Time: Sun May 24 21:30:23 GMT+2 2026

Total time taken to generate the page: 0.00835 seconds