16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 04:39:18 +02:00

basic patches for most of discovered memory leaks, fixes for brake system components

This commit is contained in:
tmj-fstate
2017-01-18 07:56:51 +01:00
parent 4da7fedfe1
commit 6ab550831d
33 changed files with 824 additions and 929 deletions

View File

@@ -48,7 +48,7 @@ class TSwitchExtension
public:
TSwitchExtension(TTrack *owner, int what);
~TSwitchExtension();
TSegment *Segments[6]; // dwa tory od punktu 1, pozostałe dwa od 2? Ra 140101: 6 połączeń dla
std::shared_ptr<TSegment> Segments[6]; // dwa tory od punktu 1, pozostałe dwa od 2? Ra 140101: 6 połączeń dla
// skrzyżowań
// TTrack *trNear[4]; //tory dołączone do punktów 1, 2, 3 i 4
// dotychczasowe [2]+[2] wskaźniki zamienić na nowe [4]
@@ -126,8 +126,8 @@ class TIsolated
class TTrack : public Resource
{ // trajektoria ruchu - opakowanie
private:
TSwitchExtension *SwitchExtension; // dodatkowe dane do toru, który jest zwrotnicą
TSegment *Segment;
std::shared_ptr<TSwitchExtension> SwitchExtension; // dodatkowe dane do toru, który jest zwrotnicą
std::shared_ptr<TSegment> Segment;
TTrack *trNext; // odcinek od strony punktu 2 - to powinno być w segmencie
TTrack *trPrev; // odcinek od strony punktu 1
// McZapkie-070402: dodalem zmienne opisujace rozmiary tekstur
@@ -204,7 +204,7 @@ class TTrack : public Resource
{
return Segment->GetLength();
};
inline TSegment * CurrentSegment()
inline std::shared_ptr<TSegment> CurrentSegment()
{
return Segment;
};