Git Product home page Git Product logo

Comments (7)

Lakritzator avatar Lakritzator commented on June 26, 2024

I'd advice you to read this issue: #80
@justinstenning just fixed a memory leak, and you should also make sure your code is working correctly.

from direct3dhook.

justinstenning avatar justinstenning commented on June 26, 2024

@Vadkarika2 When you say redraw, do you mean sending a complete new overlay to the target?

Can you please provide a quick and simple reproducible snippet for the scenario?

from direct3dhook.

jazzup avatar jazzup commented on June 26, 2024

In my heavily modified version of this project, I wrap the code in DXSprite.cs -> BeginBatch(ShaderResourceView texSRV) with a using statement:

using (Texture2D tex = _batchTexSRV.ResourceAs<Texture2D>()) { Texture2DDescription texDesc = tex.Description; _texWidth = texDesc.Width; _texHeight = texDesc.Height; } _spriteList.Clear();

It eliminated one of a few leaks I encountered. My overlay changes each time I send it, and @justinstenning , I think this is what @Vadkarika2 is doing.

from direct3dhook.

MarcellVokk avatar MarcellVokk commented on June 26, 2024

Hi! Thanks for the help!

What I mean by redraw is I send a new overlay, yes...

I'll try out what @jazzup suggested, and post an update on the results!

Thanks again,
M

from direct3dhook.

MarcellVokk avatar MarcellVokk commented on June 26, 2024

Yep! This fixes my issue, thanks for the suggestion!

from direct3dhook.

MarcellVokk avatar MarcellVokk commented on June 26, 2024

I made a pull request (#82) where I fixed this memory leak using @jazzup's suggestion!

from direct3dhook.

justinstenning avatar justinstenning commented on June 26, 2024

Merged, thx

from direct3dhook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.