Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 14267
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: Tue Aug 26 01:38:39 CEST 2025

Total time taken to generate the page: 0.05981 seconds